String.lstrip!
Signature
string.lstrip! #=> string or nil
String.lstrip! is the in-place edit version ofString.lstrip.string.lstrip! returns string with leading whitespace removed from string
or it returns nil if no leading whitespace was found.
Examples
str = "\r\n\t foo bar" #=> "\r\n\t foo bar"
str.lstrip! #=> "foo bar"
str == "\r\n\t foo bar" #=> false
str == "foo bar" #=> true
str.lstrip! #=> nil
Documentation Reference
- Log in to post comments
