module FakeS3::Util

Public Class Methods

strip_before_and_after(string, strip_this) click to toggle source
# File lib/fakes3/util.rb, line 3
def Util.strip_before_and_after(string, strip_this)
  regex_friendly_strip_this = Regexp.escape(strip_this)
  string.gsub(/\A[#{regex_friendly_strip_this}]+|[#{regex_friendly_strip_this}]+\z/, '')
end