How to check a any of the word is present in the string without using contains

Mystring1 : WWT( world wide technologies)

mystring2: world wide technologies

Here i cant use mystring2.contains(mystring2)
Please help me out to do any word match

7 posts were merged into an existing topic: To check a any of the word is present in the string without using contains