I have a problem where I am trying to search for a substring in string. That substring may or may not be in the string.
str = \"hello how are you?\" substr =
In Ruby, use the String#include? method:
String#include?
str = "hello how are you?" substr = "how are" str.include? substr
which returns true.
true