* string.c: Document current behavior for other case mapping methods
on String. [ci skip] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55217 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
632097082b
commit
ae4fba3167
@ -1,3 +1,8 @@
|
|||||||
|
Mon May 30 21:15:37 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||||
|
|
||||||
|
* string.c: Document current behavior for other case mapping methods
|
||||||
|
on String. [ci skip]
|
||||||
|
|
||||||
Mon May 30 20:00:25 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
|
Mon May 30 20:00:25 2016 Martin Duerst <duerst@it.aoyama.ac.jp>
|
||||||
|
|
||||||
* string.c: Document current situation for String#downcase. [ci skip]
|
* string.c: Document current situation for String#downcase. [ci skip]
|
||||||
|
31
string.c
31
string.c
@ -5828,10 +5828,12 @@ rb_str_casemap(VALUE source, OnigCaseFoldType *flags, rb_encoding *enc)
|
|||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* str.upcase! -> str or nil
|
* str.upcase! -> str or nil
|
||||||
|
* str.upcase!([options]) -> str or nil
|
||||||
*
|
*
|
||||||
* Upcases the contents of <i>str</i>, returning <code>nil</code> if no changes
|
* Upcases the contents of <i>str</i>, returning <code>nil</code> if no changes
|
||||||
* were made.
|
* were made.
|
||||||
* Note: case replacement is effective only in ASCII region.
|
*
|
||||||
|
* See String#downcase for meaning of +options+ and use with different encodings.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
@ -5896,11 +5898,12 @@ rb_str_upcase_bang(int argc, VALUE *argv, VALUE str)
|
|||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* str.upcase -> new_str
|
* str.upcase -> new_str
|
||||||
|
* str.upcase([options]) -> new_str
|
||||||
*
|
*
|
||||||
* Returns a copy of <i>str</i> with all lowercase letters replaced with their
|
* Returns a copy of <i>str</i> with all lowercase letters replaced with their
|
||||||
* uppercase counterparts. The operation is locale insensitive---only
|
* uppercase counterparts.
|
||||||
* characters ``a'' to ``z'' are affected.
|
*
|
||||||
* Note: case replacement is effective only in ASCII region.
|
* See String#downcase for meaning of +options+ and use with different encodings.
|
||||||
*
|
*
|
||||||
* "hEllO".upcase #=> "HELLO"
|
* "hEllO".upcase #=> "HELLO"
|
||||||
*/
|
*/
|
||||||
@ -5916,10 +5919,12 @@ rb_str_upcase(int argc, VALUE *argv, VALUE str)
|
|||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* str.downcase! -> str or nil
|
* str.downcase! -> str or nil
|
||||||
|
* str.downcase!([options]) -> str or nil
|
||||||
*
|
*
|
||||||
* Downcases the contents of <i>str</i>, returning <code>nil</code> if no
|
* Downcases the contents of <i>str</i>, returning <code>nil</code> if no
|
||||||
* changes were made.
|
* changes were made.
|
||||||
* Note: case replacement is effective only in ASCII region.
|
*
|
||||||
|
* See String#downcase for meaning of +options+ and use with different encodings.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
@ -6038,10 +6043,12 @@ rb_str_downcase(int argc, VALUE *argv, VALUE str)
|
|||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* str.capitalize! -> str or nil
|
* str.capitalize! -> str or nil
|
||||||
|
* str.capitalize!([options]) -> str or nil
|
||||||
*
|
*
|
||||||
* Modifies <i>str</i> by converting the first character to uppercase and the
|
* Modifies <i>str</i> by converting the first character to uppercase and the
|
||||||
* remainder to lowercase. Returns <code>nil</code> if no changes are made.
|
* remainder to lowercase. Returns <code>nil</code> if no changes are made.
|
||||||
* Note: case conversion is effective only in ASCII region.
|
*
|
||||||
|
* See String#downcase for meaning of +options+ and use with different encodings.
|
||||||
*
|
*
|
||||||
* a = "hello"
|
* a = "hello"
|
||||||
* a.capitalize! #=> "Hello"
|
* a.capitalize! #=> "Hello"
|
||||||
@ -6094,10 +6101,12 @@ rb_str_capitalize_bang(int argc, VALUE *argv, VALUE str)
|
|||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* str.capitalize -> new_str
|
* str.capitalize -> new_str
|
||||||
|
* str.capitalize([options]) -> new_str
|
||||||
*
|
*
|
||||||
* Returns a copy of <i>str</i> with the first character converted to uppercase
|
* Returns a copy of <i>str</i> with the first character converted to uppercase
|
||||||
* and the remainder to lowercase.
|
* and the remainder to lowercase.
|
||||||
* Note: case conversion is effective only in ASCII region.
|
*
|
||||||
|
* See String#downcase for meaning of +options+ and use with different encodings.
|
||||||
*
|
*
|
||||||
* "hello".capitalize #=> "Hello"
|
* "hello".capitalize #=> "Hello"
|
||||||
* "HELLO".capitalize #=> "Hello"
|
* "HELLO".capitalize #=> "Hello"
|
||||||
@ -6116,10 +6125,12 @@ rb_str_capitalize(int argc, VALUE *argv, VALUE str)
|
|||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* str.swapcase! -> str or nil
|
* str.swapcase! -> str or nil
|
||||||
|
* str.swapcase!([options]) -> str or nil
|
||||||
*
|
*
|
||||||
* Equivalent to <code>String#swapcase</code>, but modifies the receiver in
|
* Equivalent to <code>String#swapcase</code>, but modifies the receiver in
|
||||||
* place, returning <i>str</i>, or <code>nil</code> if no changes were made.
|
* place, returning <i>str</i>, or <code>nil</code> if no changes were made.
|
||||||
* Note: case conversion is effective only in ASCII region.
|
*
|
||||||
|
* See String#downcase for meaning of +options+ and use with different encodings.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
@ -6164,10 +6175,12 @@ rb_str_swapcase_bang(int argc, VALUE *argv, VALUE str)
|
|||||||
/*
|
/*
|
||||||
* call-seq:
|
* call-seq:
|
||||||
* str.swapcase -> new_str
|
* str.swapcase -> new_str
|
||||||
|
* str.swapcase([options]) -> new_str
|
||||||
*
|
*
|
||||||
* Returns a copy of <i>str</i> with uppercase alphabetic characters converted
|
* Returns a copy of <i>str</i> with uppercase alphabetic characters converted
|
||||||
* to lowercase and lowercase characters converted to uppercase.
|
* to lowercase and lowercase characters converted to uppercase.
|
||||||
* Note: case conversion is effective only in ASCII region.
|
*
|
||||||
|
* See String#downcase for meaning of +options+ and use with different encodings.
|
||||||
*
|
*
|
||||||
* "Hello".swapcase #=> "hELLO"
|
* "Hello".swapcase #=> "hELLO"
|
||||||
* "cYbEr_PuNk11".swapcase #=> "CyBeR_pUnK11"
|
* "cYbEr_PuNk11".swapcase #=> "CyBeR_pUnK11"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user