Method: String#rstrip!
- Defined in:
- lib/source/ruby.rb
#rstrip! ⇒ Object
call-seq:
str.rstrip! -> str
Returns str with trailing whitespace removed, or nil
if no changes were made.
s = 'abcdef '
s.rstrip! #=> "abcdef"
s.rstrip! #=> nil
s #=> "abcdef"
5801 5802 5803 5804 5805 |
# File 'lib/source/ruby.rb', line 5801 def rstrip! `var v=this._value` `this._value=v.replace(/\\s*$/,'')` return `this._value==v?nil:this` end |