class String
def remove(*patterns)
str.remove(" test", /bar/) # => "foo "
str.remove(" test") # => "foo bar"
str = "foo bar test"
Returns a new string with all occurrences of the patterns removed.
def remove(*patterns) dup.remove!(*patterns) end
def remove(*patterns) dup.remove!(*patterns) end