Simplified string-contains?

Replaced Java .indexOf string method with .contains for clarity, added
tests to cover the function.