зеркало из https://github.com/github/ruby.git
* string.c: [DOC] Add missing documentation around String#chomp.
Patchby @stderr [ci skip][fix GH-780] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48747 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
9e256261b3
Коммит
93db27d51f
|
@ -1,3 +1,8 @@
|
||||||
|
Tue Dec 9 20:24:41 2014 SHIBATA Hiroshi <shibata.hiroshi@gmail.com>
|
||||||
|
|
||||||
|
* string.c: [DOC] Add missing documentation around String#chomp.
|
||||||
|
Patchby @stderr [ci skip][fix GH-780]
|
||||||
|
|
||||||
Tue Dec 9 18:20:02 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Tue Dec 9 18:20:02 2014 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* object.c: [DOC] Revise documentation by Marcus Stollsteimer at
|
* object.c: [DOC] Revise documentation by Marcus Stollsteimer at
|
||||||
|
|
19
string.c
19
string.c
|
@ -7161,15 +7161,18 @@ rb_str_chomp_bang(int argc, VALUE *argv, VALUE str)
|
||||||
* from the end of <i>str</i> (if present). If <code>$/</code> has not been
|
* from the end of <i>str</i> (if present). If <code>$/</code> has not been
|
||||||
* changed from the default Ruby record separator, then <code>chomp</code> also
|
* changed from the default Ruby record separator, then <code>chomp</code> also
|
||||||
* removes carriage return characters (that is it will remove <code>\n</code>,
|
* removes carriage return characters (that is it will remove <code>\n</code>,
|
||||||
* <code>\r</code>, and <code>\r\n</code>).
|
* <code>\r</code>, and <code>\r\n</code>). If <code>$/</code> is an empty string,
|
||||||
|
* it will remove all trailing newlines from the string.
|
||||||
*
|
*
|
||||||
* "hello".chomp #=> "hello"
|
* "hello".chomp #=> "hello"
|
||||||
* "hello\n".chomp #=> "hello"
|
* "hello\n".chomp #=> "hello"
|
||||||
* "hello\r\n".chomp #=> "hello"
|
* "hello\r\n".chomp #=> "hello"
|
||||||
* "hello\n\r".chomp #=> "hello\n"
|
* "hello\n\r".chomp #=> "hello\n"
|
||||||
* "hello\r".chomp #=> "hello"
|
* "hello\r".chomp #=> "hello"
|
||||||
* "hello \n there".chomp #=> "hello \n there"
|
* "hello \n there".chomp #=> "hello \n there"
|
||||||
* "hello".chomp("llo") #=> "he"
|
* "hello".chomp("llo") #=> "he"
|
||||||
|
* "hello\r\n\r\n".chomp('') #=> "hello"
|
||||||
|
* "hello\r\n\r\r\n".chomp('') #=> "hello\r\n\r"
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static VALUE
|
static VALUE
|
||||||
|
|
Загрузка…
Ссылка в новой задаче