Sha256: 5295ec6ddc8dbcae788a3c05793d1fa6575dc3b6bffe51d55bbb68a7ea73993f
Contents?: true
Size: 436 Bytes
Versions: 1
Compression:
Stored size: 436 Bytes
Contents
class String # Returns an array of characters. # # "abc 123".words #=> ["abc","123"] # def words self.split(/[ ]+/) end end # _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # =begin test require 'test/unit' class TCString < Test::Unit::TestCase def test_words x = "a b c" assert_equal( ['a','b','c'], x.words ) end end =end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
facets-0.9.0 | lib/nano/string/words.rb |