method

remove!

v4.2.1 - Show latest stable - Class: String
remove!(*patterns)
public

Alters the string by removing all occurrences of the patterns.

str = "foo bar test"
str.remove!(" test")                 # => "foo bar"
str                                  # => "foo bar"