P
Philip Mak
Is there a built-in method in Ruby for checking whether a string starts
with or ends with a pattern? e.g.:
"Hello, world".start_with?("Hello") => true
"Hello, world".start_with?("world") => false
http://www.rubygarden.org/article.php?sid=312 suggests that such a
method was suggested for inclusion into Ruby, but I don't see it in
version 1.8.0.
with or ends with a pattern? e.g.:
"Hello, world".start_with?("Hello") => true
"Hello, world".start_with?("world") => false
http://www.rubygarden.org/article.php?sid=312 suggests that such a
method was suggested for inclusion into Ruby, but I don't see it in
version 1.8.0.