Checks if a string contains a given substring, ignoring case.
The string to search within.
The substring to search for.
true if search is found in str (case-insensitive), otherwise false.
true
search
str
false
1.1.0
containsIgnoreCase("Hello World", "hello"); // truecontainsIgnoreCase("Hello World", "WORLD"); // truecontainsIgnoreCase("Hello World", "test"); // false Copy
containsIgnoreCase("Hello World", "hello"); // truecontainsIgnoreCase("Hello World", "WORLD"); // truecontainsIgnoreCase("Hello World", "test"); // false
Checks if a string contains a given substring, ignoring case.