Ruby | String delete! Method
delete! is a String class method in Ruby which is used to perform a delete operation, returning the given string, or nil if the given string was not modified.
Parameters: Here, str is the given string and parameter_list are the specified characters.
Returns: nil if the string not modified.