Sha256: 40a83bfe42eead8f5f8335260eb8b51bbc988b5c714d679c7235bd8f750b2309

Contents?: true

Size: 183 Bytes

Versions: 3

Compression:

Stored size: 183 Bytes

Contents

class String
  def filter_prefix! prefix
    sliced = slice! /^#{prefix}/
    !sliced.nil?
  end

  def filter_prefix prefix
    s = clone
    s.filter_prefix! prefix
    s
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
programmable-ventouse-0.1.3 lib/ventouse/filter_prefix.rb
programmable-ventouse-0.1.4 lib/ventouse/filter_prefix.rb
programmable-ventouse-0.1.5 lib/ventouse/filter_prefix.rb