[DOC] Tweaks for String#chr

This commit is contained in:
BurdetteLamar 2025-07-09 12:55:44 -05:00 committed by Peter Zhu
parent 94e702b0ba
commit 3baed2ea38
2 changed files with 9 additions and 4 deletions

8
doc/string/chr.rdoc Normal file
View file

@ -0,0 +1,8 @@
Returns a string containing the first character of +self+:
'hello'.chr # => "h"
'тест'.chr # => "т"
'こんにちは'.chr # => "こ"
''.chr # => ""
Related: see {Converting to New String}[rdoc-ref:String@Converting+to+New+String].

View file

@ -6689,10 +6689,7 @@ rb_str_clear(VALUE str)
* call-seq:
* chr -> string
*
* Returns a string containing the first character of +self+:
*
* s = 'foo' # => "foo"
* s.chr # => "f"
* :include: doc/string/chr.rdoc
*
*/