[DOC] Tweaks for String#[] (#13335)
This commit is contained in:
parent
1f72512b03
commit
b00a339603
Notes:
git
2025-05-14 18:34:22 +00:00
Merged-By: peterzhu2118 <peter@peterzhu.ca>
12
string.c
12
string.c
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user