Sunday, March 6, 2016

Jquery set charater at string

 setCharAt: function (str, index, chr) {
        if (index > str.length - 1) return str;
        return str.substr(0, index) + chr + str.substr(index + 1);
    }

No comments:

Post a Comment