[DOC] Enhanced RDoc for String (#5753)

Treats:
    #length
    #bytesize
This commit is contained in:
Burdette Lamar 2022-04-03 10:09:34 -05:00 committed by GitHub
parent f801386f0c
commit 0b0ae583f4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
Notes: git 2022-04-04 00:10:05 +09:00
Merged-By: BurdetteLamar <BurdetteLamar@Yahoo.com>
3 changed files with 26 additions and 12 deletions

View file

@ -2115,14 +2115,8 @@ rb_str_strlen(VALUE str)
* call-seq:
* length -> integer
*
* Returns the count of characters (not bytes) in +self+:
* :include: doc/string/length.rdoc
*
* "\x80\u3042".length # => 2
* "hello".length # => 5
*
* String#size is an alias for String#length.
*
* Related: String#bytesize.
*/
VALUE
@ -2135,12 +2129,8 @@ rb_str_length(VALUE str)
* call-seq:
* bytesize -> integer
*
* Returns the count of bytes in +self+:
* :include: doc/string/bytesize.rdoc
*
* "\x80\u3042".bytesize # => 4
* "hello".bytesize # => 5
*
* Related: String#length.
*/
static VALUE