Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- String.prototype.trim = function(c, t){
- return c = "[" + (c == undefined ? " " : c.replace(/([\^\]\\-])/g, "\\\$1")) + "]+",
- this.replace(new RegExp((t != 2 ? "^" : "") + c + (t != 1 ? "|" + c + "$" : ""), "g"), "");
- };
Add Comment
Please, Sign In to add comment