mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
[DOC] Tweaks for String#concat (#13836)
This commit is contained in:
parent
a1acba6d14
commit
51252ef8d7
2 changed files with 13 additions and 13 deletions
12
doc/string/concat.rdoc
Normal file
12
doc/string/concat.rdoc
Normal file
|
@ -0,0 +1,12 @@
|
|||
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].
|
Loading…
Add table
Add a link
Reference in a new issue