JavaScript or jQuery equivalent of PHP’s strstr() function
Try using this: function strstr(haystack, needle, bool) { // Finds first occurrence of a string within another // // version: 1103.1210 // discuss at: http://phpjs.org/functions/strstr // + original by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // + bugfixed by: Onno Marsman // + improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net) // * example 1: strstr(‘Kevin van Zonneveld’, ‘van’); … Read more