mirror of
https://github.com/ruby/ruby.git
synced 2025-09-15 08:33:58 +02:00
[DOC] Tweaks for String#capitalize!
This commit is contained in:
parent
987b5bf972
commit
0604d0c9db
1 changed files with 5 additions and 13 deletions
18
string.c
18
string.c
|
@ -8242,22 +8242,14 @@ rb_str_downcase(int argc, VALUE *argv, VALUE str)
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* capitalize!(mapping) -> self or nil
|
* capitalize!(mapping = :ascii) -> self or nil
|
||||||
*
|
*
|
||||||
* Upcases the first character in +self+;
|
* Like String#capitalize, except that:
|
||||||
* downcases the remaining characters;
|
|
||||||
* returns +self+ if any changes were made, +nil+ otherwise:
|
|
||||||
*
|
*
|
||||||
* s = 'hello World!' # => "hello World!"
|
* - Changes character casings in +self+ (not in a copy of +self+).
|
||||||
* s.capitalize! # => "Hello world!"
|
* - Returns +self+ if any changes are made, +nil+ otherwise.
|
||||||
* s # => "Hello world!"
|
|
||||||
* s.capitalize! # => nil
|
|
||||||
*
|
|
||||||
* The casing may be affected by the given +mapping+;
|
|
||||||
* see {Case Mapping}[rdoc-ref:case_mapping.rdoc].
|
|
||||||
*
|
|
||||||
* Related: String#capitalize.
|
|
||||||
*
|
*
|
||||||
|
* Related: See {Modifying}[rdoc-ref:String@Modifying].
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue