function Xfulltrim(str, chars) { return ltrim(rtrim(str, chars), chars); }
function Xltrim(str, chars) { chars = chars || "\\s"; return str.replace(new RegExp("^[" + chars + "]+", "g"), ""); }
function Xrtrim(str, chars) { chars = chars || "\\s"; return str.replace(new RegExp("[" + chars + "]+$", "g"), ""); }
String.prototype.trim = function() { return this.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,""); }
String.prototype.fulltrim = function() { return this.replace(/(?:(?:^|\n)\s+|\s+(?:$|\n))/g,"").replace(/\s+/g," "); }
String.prototype.stripHTML = function() { return this.replace(/<(.|\n)*?>/g, ''); }

