Nodejs Utililty Methods String Trim Left

List of utility methods to do String Trim Left

Description

The list of methods to do String Trim Left are organized into topic(s).

Method

lTrim()
String.prototype.lTrim = function() {
  return this.replace(/(^\s*)/g, "");
};
lTrim()
String.prototype.lTrim = function () {
  var $whitespace = new String(" \t\n\r");
  if ($whitespace.indexOf(this.charAt(0)) != -1) {
    var $i = this.length;
    var $j = 0;
    while ($j < $i && $whitespace.indexOf(this.charAt($j)) != -1) {
      $j++;
    return this.substring($j, $i);
...
lTrim(charlist)
String.prototype.lTrim = function(charlist) {
  if (charlist === undefined)
    charlist = "\s";
  return this.replace(new RegExp("^[" + charlist + "]+"), "");
};
leftTrim()
String.prototype.leftTrim = function () {
    return this.replace(/^\s+/, "");
leftTrim()
String.prototype.leftTrim = function() { 
   return this.replace(/(^\s*)/g, ""); 
leftTrim()
String.prototype.leftTrim =function(){
    return this.replace(/^\s+/,'');
lefttrim( )
String.prototype.lefttrim = function( )
  return( this.replace(new RegExp("^[\\s]+", "gm"), "") );
};
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 + ')+' );
...
LTrim()
String.prototype.LTrim = function(){
  return this.replace(/(^\s*)/g, "");
};
LTrim()
String.prototype.LTrim = function() {
    return this.replace(/^\s+/g, "");