class String

Public Instance Methods

ends_with?(other) click to toggle source
# File lib/openid/extras.rb, line 7
def ends_with?(other)
  tail = self[-1 * other.length, other.length]
  tail == other
end
starts_with?(other) click to toggle source
# File lib/openid/extras.rb, line 2
def starts_with?(other)
  head = self[0, other.length]
  head == other
end