diff options
| author | BurdetteLamar <burdettelamar@yahoo.com> | 2025-08-21 17:36:09 -0500 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-08-21 18:52:15 -0400 |
| commit | 6fbe2dd36e30a2ecbfa770d3ebfbb8e601d97bd3 (patch) | |
| tree | 6ed982064b108819658c7cc4d6d30ed60ce2c2ce /string.c | |
| parent | 823d55a8279aad5ad0eb2b83d45885443edfec83 (diff) | |
[DOC] Tweaks for String#insert
Diffstat (limited to 'string.c')
| -rw-r--r-- | string.c | 14 |
1 files changed, 2 insertions, 12 deletions
@@ -6056,19 +6056,9 @@ rb_str_aset_m(int argc, VALUE *argv, VALUE str) /* * call-seq: - * insert(index, other_string) -> self + * insert(offset, other_string) -> self * - * Inserts the given +other_string+ into +self+; returns +self+. - * - * If the Integer +index+ is positive, inserts +other_string+ at offset +index+: - * - * 'foo'.insert(1, 'bar') # => "fbaroo" - * - * If the Integer +index+ is negative, counts backward from the end of +self+ - * and inserts +other_string+ at offset <tt>index+1</tt> - * (that is, _after_ <tt>self[index]</tt>): - * - * 'foo'.insert(-2, 'bar') # => "fobaro" + * :include: doc/string/insert.rdoc * */ |
