Nodejs String Trim Left LTrim()

Here you can find the source of LTrim()

Method Source Code

String.prototype.LTrim = function() {
    return this.replace(/^\s+/g, "");
}

Related

  1. leftTrim()
    String.prototype.leftTrim = function() { 
       return this.replace(/(^\s*)/g, ""); 
    
  2. leftTrim()
    String.prototype.leftTrim =function(){
        return this.replace(/^\s+/,'');
    
  3. lefttrim( )
    String.prototype.lefttrim = function( )
      return( this.replace(new RegExp("^[\\s]+", "gm"), "") );
    };
    
  4. TrimStart( aimStr )
    String.prototype.TrimStart = function( aimStr )
        var str = this;
        var re = My.RegExp.InvolvedCharsRegExp;
        var reStart;
        if ( aimStr )
            aimStr = aimStr.replace( re, '\\$1' );
            reStart = new RegExp( '^(' + aimStr + ')+' );
    ...
    
  5. LTrim()
    String.prototype.LTrim = function(){
      return this.replace(/(^\s*)/g, "");
    };