diff options
| author | Burdette Lamar <BurdetteLamar@Yahoo.com> | 2025-06-30 13:13:09 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-06-30 14:13:09 -0400 |
| commit | 35feaee91767ca2d9224887a356c3a82d07dac26 (patch) | |
| tree | 9f1d431b58f843c161044e886e9005aaf1fff41b /string.c | |
| parent | 456f6f3f83ad422fa58f350bd2db45d0d0f4a59d (diff) | |
[DOC] Tweaks for String#bytesplice
Diffstat (limited to 'string.c')
| -rw-r--r-- | string.c | 23 |
1 files changed, 6 insertions, 17 deletions
@@ -6913,23 +6913,12 @@ str_check_beg_len(VALUE str, long *beg, long *len) /* * call-seq: - * bytesplice(index, length, str) -> string - * bytesplice(index, length, str, str_index, str_length) -> string - * bytesplice(range, str) -> string - * bytesplice(range, str, str_range) -> string - * - * Replaces some or all of the content of +self+ with +str+, and returns +self+. - * The portion of the string affected is determined using - * the same criteria as String#byteslice, except that +length+ cannot be omitted. - * If the replacement string is not the same length as the text it is replacing, - * the string will be adjusted accordingly. - * - * If +str_index+ and +str_length+, or +str_range+ are given, the content of +self+ is replaced by str.byteslice(str_index, str_length) or str.byteslice(str_range); however the substring of +str+ is not allocated as a new string. - * - * The form that take an Integer will raise an IndexError if the value is out - * of range; the Range form will raise a RangeError. - * If the beginning or ending offset does not land on character (codepoint) - * boundary, an IndexError will be raised. + * bytesplice(offset, length, str) -> self + * bytesplice(offset, length, str, str_offset, str_length) -> self + * bytesplice(range, str) -> self + * bytesplice(range, str, str_range) -> self + * + * :include: doc/string/bytesplice.rdoc */ static VALUE |
