concat(*args) public

Append—Concatenates the given object to str. If the object is an Integer, it is considered as a codepoint, and is converted to a character before concatenation. Concat can take multiple arguments. All the arguments are concatenated in order.

a = "hello "
a << "world"   #=> "hello world"
a.concat(33)   #=> "hello world!"
a              #=> "hello world!"

b = "sn"
b.concat(b, b)    #=> "snsnsn"
Show source
Register or log in to add new notes.