class String
Public Instance Methods
ends_with?(string)
click to toggle source
# File lib/eagleclaw/string.rb, line 8 def ends_with?(string) !! (self =~ Regexp.new(Regexp.escape(string) + '$')) end
sha1()
click to toggle source
# File lib/eagleclaw/string.rb, line 12 def sha1 (Digest::SHA1.new << self).hexdigest end
starts_with?(string)
click to toggle source
# File lib/eagleclaw/string.rb, line 4 def starts_with?(string) !! (self =~ Regexp.new('^' + Regexp.escape(string))) end