Class: TestKyaniteStringMisc

Inherits
UnitTest
  • Object
show all
Defined in
test/string/test_misc.rb

Tests for String

String Additions

Kyanite definitions

String

Kyanite tests and examples

Cast Chars Diff Database-Helper Miscellaneous Nested Split

Usage

require 'kyanite/string'

Required from Facets String:

shatter(re)

Breaks a string up into an array based on a regular expression. Similar to scan, but includes the matches.

Instance Method Summary (collapse)

Instance Method Details

- (Object) test_mgsub



16
17
18
19
# File 'test/string/test_misc.rb', line 16

def test_mgsub
	assert_equal 'bEtwIIn', 'between'.mgsub([[/ee/, 'II'], [/e/, 'E']])  
	assert_equal 'Hallo', 'Hallo'.mgsub([])  
end