mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[DOC] Tweaks for String#chr
This commit is contained in:
parent
94e702b0ba
commit
3baed2ea38
2 changed files with 9 additions and 4 deletions
8
doc/string/chr.rdoc
Normal file
8
doc/string/chr.rdoc
Normal 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].
|
5
string.c
5
string.c
|
@ -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
|
||||
*
|
||||
*/
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue