method

remove

Importance_1
v7.0.0 - 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.