0

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".

jaya sankar
  • 39
  • 2
  • 13

2 Answers2

4

num indexOf(str inputString1, str inputString2)

if the return value is -1 then inputString1 does not contain inputString2

André Schäfer
  • 608
  • 5
  • 15
  • Yes, Thanks. But its works with Case sensitive.Do we have any Alternatives to work with case insensitive letters also. – jaya sankar Sep 29 '16 at 10:16
  • No, but you could try to open the documentation which might allow you to find: str toLowerCase(str inputString) which is available for 2.4 clients and higher – André Schäfer Sep 29 '16 at 10:32
0

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.

Community
  • 1
  • 1
JCimbal
  • 46
  • 3