* string.c: improve docs for String#strip and variations. [ruby-core:66081][Bug #10476]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49135 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
ayumin 2015-01-04 03:37:10 +00:00
parent cf0006ea2b
commit 6abaf76463
2 changed files with 19 additions and 0 deletions

View File

@ -1,3 +1,8 @@
Sun Jan 4 12:24:11 2015 Ayumu AIZAWA <ayumu.aizawa@gmail.com>
* string.c: improve docs for String#strip and variations.
[ruby-core:66081][Bug #10476]
Sun Jan 4 09:21:04 2015 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
* lib/drb/drb.rb: removed unused argument. Patch by @vipulnsward

View File

@ -7281,6 +7281,8 @@ lstrip_offset(VALUE str, const char *s, const char *e, rb_encoding *enc)
* change was made. See also <code>String#rstrip!</code> and
* <code>String#strip!</code>.
*
* Refer to <code>strip</code> for the definition of whitespace.
*
* " hello ".lstrip #=> "hello "
* "hello".lstrip! #=> nil
*/
@ -7317,6 +7319,8 @@ rb_str_lstrip_bang(VALUE str)
* Returns a copy of <i>str</i> with leading whitespace removed. See also
* <code>String#rstrip</code> and <code>String#strip</code>.
*
* Refer to <code>strip</code> for the definition of whitespace.
*
* " hello ".lstrip #=> "hello "
* "hello".lstrip #=> "hello"
*/
@ -7366,6 +7370,8 @@ rstrip_offset(VALUE str, const char *s, const char *e, rb_encoding *enc)
* no change was made. See also <code>String#lstrip!</code> and
* <code>String#strip!</code>.
*
* Refer to <code>strip</code> for the definition of whitespace.
*
* " hello ".rstrip #=> " hello"
* "hello".rstrip! #=> nil
*/
@ -7401,6 +7407,8 @@ rb_str_rstrip_bang(VALUE str)
* Returns a copy of <i>str</i> with trailing whitespace removed. See also
* <code>String#lstrip</code> and <code>String#strip</code>.
*
* Refer to <code>strip</code> for the definition of whitespace.
*
* " hello ".rstrip #=> " hello"
* "hello".rstrip #=> "hello"
*/
@ -7427,6 +7435,8 @@ rb_str_rstrip(VALUE str)
*
* Removes leading and trailing whitespace from <i>str</i>. Returns
* <code>nil</code> if <i>str</i> was not altered.
*
* Refer to <code>strip</code> for the definition of whitespace.
*/
static VALUE
@ -7464,8 +7474,12 @@ rb_str_strip_bang(VALUE str)
*
* Returns a copy of <i>str</i> with leading and trailing whitespace removed.
*
* Whitespace is defined as any of the following characters:
* null, horizontal tab, line feed, vertical tab, form feed, carriage return, space.
*
* " hello ".strip #=> "hello"
* "\tgoodbye\r\n".strip #=> "goodbye"
* "\x00\t\n\v\f\r ".strip #=> ""
*/
static VALUE