Javascript String dotrim()
dotrim()
String.prototype.dotrim = function () { return this .replace(/^\s\s*/, '' ).replace(/\s\s*$/, '' ); }