method

remove

Importance_1
v6.1.3.1 - Show latest stable - 0 notes - Class: String
remove(*patterns) public

Returns a new string with all occurrences of the patterns removed.

str = "foo bar test"
str.remove(" test")                 # => "foo bar"
str.remove(" test", /bar/)          # => "foo "
str                                 # => "foo bar test"
Show source
Register or log in to add new notes.