Left trim a string using regex - Node.js String

Node.js examples for String:Trim

Description

Left trim a string using regex

Demo Code

String.prototype.ltrim = function()
{
  return this.replace( /^\s*/g, '' ) ;
}

Related Tutorials