mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +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:
|
||||
* capitalize!(mapping) -> self or nil
|
||||
* capitalize!(mapping = :ascii) -> self or nil
|
||||
*
|
||||
* Upcases the first character in +self+;
|
||||
* downcases the remaining characters;
|
||||
* returns +self+ if any changes were made, +nil+ otherwise:
|
||||
* Like String#capitalize, except that:
|
||||
*
|
||||
* s = 'hello World!' # => "hello World!"
|
||||
* s.capitalize! # => "Hello world!"
|
||||
* 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.
|
||||
* - Changes character casings in +self+ (not in a copy of +self+).
|
||||
* - Returns +self+ if any changes are made, +nil+ otherwise.
|
||||
*
|
||||
* Related: See {Modifying}[rdoc-ref:String@Modifying].
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue