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