Answers for "javascript string search case insensitive"

1

javascript string search case insensitive

function stringContainsCaseInsensitive(search, subject){
    return subject.toLowerCase().indexOf(search.toLowerCase()) !== -1;
}

stringContainsCaseInsensitive("red","We painted the room red.");//true
Posted by: Guest on August-05-2019

Code answers related to "javascript string search case insensitive"

Code answers related to "Javascript"

Browse Popular Code Answers by Language