Revision: 45440
Initial Code
Initial URL
Initial Description
Initial Title
Initial Tags
Initial Language
at April 30, 2011 15:41 by anagai
Initial Code
//full trim
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g,"");
}
//left trim
String.prototype.ltrim = function() {
return this.replace(/^\s+/,"");
}
//right trim
String.prototype.rtrim = function() {
return this.replace(/\s+$/,"");
}
Initial URL
Initial Description
Initial Title
Javascript Trim Functions
Initial Tags
javascript
Initial Language
JavaScript