joe-black wrote:
> hello everyone.
> any one like to share some experience about ruby string
> just like java: trim(), split(), or indexOf()

Java split() => Ruby String.split:

"hello world".split( " ")

returns [ "hello", "world" ].

Java trim() => Ruby String.strip:

"    hello world          ".strip

returns "hello world".

Java indexOf() => Ruby String.index

"hello world".index( "w")

returns 6.

-- 
Posted via http://www.ruby-forum.com/.