Sha256: 62fa3480234900e6f510f0dcc4a169b65b5203c157abc0fc292aeccfa1ccdaf6

Contents?: true

Size: 198 Bytes

Versions: 17

Compression:

Stored size: 198 Bytes

Contents

class String
  def starts_with?(other)
    head = self[0, other.length]
    head == other
  end

  def ends_with?(other)
    tail = self[-1 * other.length, other.length]
    tail == other
  end
end

Version data entries

17 entries across 17 versions & 4 rubygems

Version Path
pelle-ruby-openid-2.1.8 lib/openid/extras.rb
ruby-openid-2.2.2 lib/openid/extras.rb
ruby-openid-2.2.1 lib/openid/extras.rb
ruby-openid-2.2.0 lib/openid/extras.rb
entp-ruby-openid-2.2 lib/openid/extras.rb
nov-ruby-openid-2.1.9 lib/openid/extras.rb
ruby-openid-2.1.8 lib/openid/extras.rb
pelle-ruby-openid-2.1.9 lib/openid/extras.rb
ruby-openid-2.1.7 lib/openid/extras.rb
ruby-openid-2.0.1 lib/openid/extras.rb
ruby-openid-2.0.2 lib/openid/extras.rb
ruby-openid-2.1.5 lib/openid/extras.rb
ruby-openid-2.1.6 lib/openid/extras.rb
ruby-openid-2.0.3 lib/openid/extras.rb
ruby-openid-2.1.4 lib/openid/extras.rb
ruby-openid-2.1.2 lib/openid/extras.rb
ruby-openid-2.0.4 lib/openid/extras.rb