[DOC] Tweaks for String#[] (#13335)

This commit is contained in:
Burdette Lamar 2025-05-14 13:34:09 -05:00 committed by GitHub
parent 1f72512b03
commit b00a339603
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
Notes: git 2025-05-14 18:34:22 +00:00
Merged-By: peterzhu2118 <peter@peterzhu.ca>

View File

@ -6092,16 +6092,16 @@ rb_str_aref(VALUE str, VALUE indx)
/*
* call-seq:
* string[index] -> new_string or nil
* string[start, length] -> new_string or nil
* string[range] -> new_string or nil
* string[regexp, capture = 0] -> new_string or nil
* string[substring] -> new_string or nil
* self[index] -> new_string or nil
* self[start, length] -> new_string or nil
* self[range] -> new_string or nil
* self[regexp, capture = 0] -> new_string or nil
* self[substring] -> new_string or nil
*
* Returns the substring of +self+ specified by the arguments.
* See examples at {String Slices}[rdoc-ref:String@String+Slices].
*
*
* Related: see {Converting to New String}[rdoc-ref:String@Converting+to+New+String].
*/
static VALUE