Remove substring from the string

I am just wondering if there is any method to remove string from another string?
Something like this:

class String
  def remove(s)
    self[s.length, self.length - s.length]
  end
end

9 Answers
9

Leave a Comment