mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
[DOC] Tweaks for String#chomp!
This commit is contained in:
parent
087387794a
commit
f17e5c4d5a
1 changed files with 5 additions and 2 deletions
7
string.c
7
string.c
|
@ -10314,9 +10314,12 @@ rb_str_chomp_string(VALUE str, VALUE rs)
|
|||
* call-seq:
|
||||
* chomp!(line_sep = $/) -> self or nil
|
||||
*
|
||||
* Like String#chomp, but modifies +self+ in place;
|
||||
* returns +nil+ if no modification made, +self+ otherwise.
|
||||
* Like String#chomp, except that:
|
||||
*
|
||||
* - Removes trailing characters from +self+ (not from a copy of +self+).
|
||||
* - Returns +self+ if any characters are removed, +nil+ otherwise.
|
||||
*
|
||||
* Related: see {Modifying}[rdoc-ref:String@Modifying].
|
||||
*/
|
||||
|
||||
static VALUE
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue