Checking for prefixes and suffixes: Ruby 1.9 and later
s = "hello" s.start_with? "hell" # => true. Note singular "start" not "starts" s.end_with? "bells" # => false