In Python, I can strip white-spaces, new lines or random characters from strings like
>>> '/asdf/asdf'.strip('/')
'asdf/asdf' # Removes / from start
>>> '/asdf/asdf'.strip('/f')
'asdf/asd' # Removes / from start and f from end
>>> ' /asdf/asdf '.strip()
'/asdf/asdf' # Removes white space from start and end
>>> '/asdf/asdf'.strip('/as')
'df/asdf' # Removes /as from start
>>> '/asdf/asdf'.strip('/af')
'sdf/asd' # Removes /a from start and f from end
But Ruby's String#strip method accepts no arguments. I can always fall back to using regular expressions but is there a method/way to strip random characters from strings (rear and front) in Ruby without using regular expressions?