mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
12 lines
527 B
Text
12 lines
527 B
Text
Concatenates each object in +objects+ to +self+; returns +self+:
|
|
|
|
'foo'.concat('bar', 'baz') # => "foobarbaz"
|
|
|
|
For each given object +object+ that is an integer,
|
|
the value is considered a codepoint and converted to a character before concatenation:
|
|
|
|
'foo'.concat(32, 'bar', 32, 'baz') # => "foo bar baz" # Embeds spaces.
|
|
'те'.concat(1089, 1090) # => "тест"
|
|
'こん'.concat(12395, 12385, 12399) # => "こんにちは"
|
|
|
|
Related: see {Converting to New String}[rdoc-ref:String@Converting+to+New+String].
|