File tree Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Expand file tree Collapse file tree 2 files changed +13
-13
lines changed Original file line number Diff line number Diff line change
1
+ Concatenates each object in +objects+ to +self+; returns +self+:
2
+
3
+ 'foo'.concat('bar', 'baz') # => "foobarbaz"
4
+
5
+ For each given object +object+ that is an integer,
6
+ the value is considered a codepoint and converted to a character before concatenation:
7
+
8
+ 'foo'.concat(32, 'bar', 32, 'baz') # => "foo bar baz" # Embeds spaces.
9
+ 'те'.concat(1089, 1090) # => "тест"
10
+ 'こん'.concat(12395, 12385, 12399) # => "こんにちは"
11
+
12
+ Related: see {Converting to New String}[rdoc-ref:String@Converting+to+New+String].
Original file line number Diff line number Diff line change @@ -3789,19 +3789,7 @@ rb_str_concat_literals(size_t num, const VALUE *strary)
3789
3789
* call-seq:
3790
3790
* concat(*objects) -> string
3791
3791
*
3792
- * Concatenates each object in +objects+ to +self+ and returns +self+:
3793
- *
3794
- * s = 'foo'
3795
- * s.concat('bar', 'baz') # => "foobarbaz"
3796
- * s # => "foobarbaz"
3797
- *
3798
- * For each given object +object+ that is an Integer,
3799
- * the value is considered a codepoint and converted to a character before concatenation:
3800
- *
3801
- * s = 'foo'
3802
- * s.concat(32, 'bar', 32, 'baz') # => "foo bar baz"
3803
- *
3804
- * Related: String#<<, which takes a single argument.
3792
+ * :include: doc/string/concat.rdoc
3805
3793
*/
3806
3794
static VALUE
3807
3795
rb_str_concat_multi (int argc , VALUE * argv , VALUE str )
You can’t perform that action at this time.
0 commit comments