Javascript String trimLeft()
String.prototype.trimLeft = function () { return this.replace(/^\s+/, ""); };
// This function removes all spaces at the beginning of a string String.prototype.trimLeft = function() { return this.replace(/^\s+/, ''); };
String.prototype.trimLeft = function() { return this.replace(/(^\s*)/g, ""); }
String.prototype.trimLeft = String.prototype.trimLeft || function() { return this.replace(/^\s+/,''); };