I am having 2 string and wanted to compare ignoring the case.
Ex:
s1.contains(s2.toLowerCase()) in this case the problem is s1 might be in upper case.
s1.toLowerCase().contains(s2) in this case the problem is s2 might be in upper case.
The only option is i need to change both the string to lowercase to find the contains.
ex: s1.toLowerCase().contains(s2.toLowerCase())
Is there is any utility or string method instead of using this approach as String is immutable.
Thanks.