Reputation: 39
Do we have any methods in mel to check string contained in some another String or not. For Example: I had String like "mel". I had Another String like "melcode". Do we have any idea how to check the String "mel" is available in String "melcode".
Upvotes: 0
Views: 428
Reputation: 46
As mentioned in Is there any possible way to filter movelets using mel from another movlet?
Hi Jaya Sankar, you can use indexOf which returns -1 if the first input String does not contain the second input String. There are also startsWith and endsWith as methods.
Upvotes: 0
Reputation: 608
num indexOf(str inputString1, str inputString2)
if the return value is -1 then inputString1 does not contain inputString2
Upvotes: 4