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 =
If you want only check if a substring is in string, you can use: str[substr].
str[substr]
It returns substring or nil.