resources/assets/js/custom-front.js
// This function to make replace in string
This function to make replace in string
This function to make replace in string
function strReplace(oldStr, newStr, str) {
        if (isArray(oldStr)) {
            for (var i in oldStr) {
                var rpl = oldStr[i];
                var patt = new RegExp(escapeRegExp(rpl), 'g');
                str = str.replace(patt, (isArray(newStr) ? newStr[i] : newStr));
            }
            return str;
        }
        else if (isString(str)) {
            var patt = new RegExp(oldStr, 'g');
            return str.replace(patt, newStr);
        }
        else
            return "";
    }
function strReplace ( oldStr , newStr , str ) { if ( isArray ( oldStr ) ) { for ( var i in oldStr ) { var rpl = oldStr [ i ] ; var patt = new RegExp ( escapeRegExp ( rpl ) , 'g' ) ; str = str . replace ( patt , ( isArray ( newStr ) ? newStr [ i ] : newStr ) ) ; } return str ; } else if ( isString ( str ) ) { var patt = new RegExp ( oldStr , 'g' ) ; return str . replace ( patt , newStr ) ; } else return "" ; }
This function to make replace in string
This function to make replace in string