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+/, "");
    
  2. leftTrim()
    String.prototype.leftTrim = function() { 
       return this.replace(/(^\s*)/g, ""); 
    
  3. leftTrim()
    String.prototype.leftTrim =function(){
        return this.replace(/^\s+/,'');
    
  4. lefttrim( )
    String.prototype.lefttrim = function( )
      return( this.replace(new RegExp("^[\\s]+", "gm"), "") );
    };
    
  5. 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 + ')+' );
    ...
    
  6. LTrim()
    String.prototype.LTrim = function() {
        return this.replace(/^\s+/g, "");