Sha256: 4f262cd0d660df829260c261b0e22bd0545590cb7753671fada80f59a8352f96

Contents?: true

Size: 83 Bytes

Versions: 5

Compression:

Stored size: 83 Bytes

Contents

class String
  def strip(what = /\s/)
    gsub /^#{what}*|#{what}*$/, ''
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
freighthopper-0.1.14 lib/freighthopper/string/strip.rb
freighthopper-0.1.13 lib/freighthopper/string/strip.rb
freighthopper-0.1.12 lib/freighthopper/string/strip.rb
freighthopper-0.1.11 lib/freighthopper/string/strip.rb
freighthopper-0.1.9 lib/freighthopper/string/strip.rb