1 String.prototype.Trim = function(){
2 return this.replace(/(^\s*)|(\s*$)/g, "");
3 }
4
5 String.prototype.LTrim = function(){
6 return this.replace(/(^\s*)/g, "");
7 }
8 String.prototype.RTrim = function(){
9 return this.replace(/(\s*$)/g, "");
10
11 }