If you’re referring to a python script, you’re looking for the “in” operator:
if "ello" in "Hello World":
If you’re referring to an expression binding, you have your logic correct. Your example returns a value of 1. Where are you attempting to put your expression logic? If it’s outside of an expression binding on a component or an expression tag, you won’t be able to use expression functions.
It also might be the type of quotation marks you’re using. If you copy-pasted your quotation marks (e.g. from the forums here) it gives a configuration error.