var result = text.replace( /^(\s|\u00A0)+|(\s|\u00A0)+$/g, "" ) String.prototype.trim = function () { return this.replace( /^\s*(\S*(\s+\S+)*)\s*$/, "$1"); };
No comments:
Post a Comment