Is there a present? method in ruby to check if a string is present within an other? I’d want to return as soon as a match is found since I will be checking for multiple substrings. Thanks!
Is there a present? method in ruby to check if a string is present
Share
Sorry, found what i was looking for (because of the use of regexp):
http://ruby-doc.org/core-1.9.3/String.html
i just used a loop checking if the index is nil