List of utility methods to do String Trim Left
ltrim()String.prototype.ltrim = function() { return this.replace(/^\s+/,""); }; | |
ltrim()String.prototype.ltrim = function() { return this.replace(/^\s+/g,""); | |
ltrim()var s1 = new String(' A B '); String.prototype.ltrim = function(){ var regexp = /^\s*/; var result = this.replace(regexp, ''); return result; }; console.log('||'+s1.ltrim()+'||'); | |
ltrim()String.prototype.ltrim = function() { return this.replace(/^\s*/g,''); | |
ltrim()String.prototype.ltrim=function() return this.replace(/(^\s*)/g,''); | |
ltrim()String.prototype.ltrim = function() { return this.replace(/(^\s*)/g, ""); | |
ltrim()String.prototype.ltrim = function() { return this.replace(/^\s+/,''); | |
ltrim()String.prototype.ltrim = function(){ return this.replace(/\s+$/, ""); }; | |
ltrim()String.prototype.ltrim = function(){ return this.replace(/^\s+/, ""); }; | |
ltrim()String.prototype.ltrim = function() return this.replace( /^\s*/g, '' ) ; |