Home‎ > ‎Comp‎ > ‎Ruby‎ > ‎

The Ruby Programming Language

s="hello"
s.concat(" world")
# s << "world"
s.insert(5, "there")
# s[5]="there"
s.slice(0,5)
s.slice!(5,6)
# s[5,6]=""
s.eql?("hello world")
# s=="hello world"

Comments