javascript string search case insensitive
function stringContainsCaseInsensitive(search, subject){
return subject.toLowerCase().indexOf(search.toLowerCase()) !== -1;
}
stringContainsCaseInsensitive("red","We painted the room red.");//true
Also in JavaScript:
- create react native app npx
- how to run method in method vue js on load
- json datetime
- javascript does not equal
- name class and id referance in ajax
- printf statement in javascript
- update node mac to specific version
- angular 6 key value pair getvalue example
- react overflow scroll
- jquery validator no space
- button copy javascript
- how to use dotenv in javascript
- convert string to datetime javascript
- javascript code for find the last element in array
- lexical scope javascript
- javascript pad with leading zeros
- add jquery to page
- js window resize listener
- jquery on dom change
- url to blob js
- simple return data jquery
- ngingx proxy express get real ip
- after load page jquery
- button group get value