Possible Duplicate:
JavaScript: string contains
I'm looking for an algorithm to check if a string exists in another.
For example:
'Hello, my name is jonh LOL.'.contains('Hello, my name is jonh'); //true
'LOL. Hello, my name is jonh'.contains('Hello, my name is jonh'); //true
Thanks in advance.