Hey guys,
there are lots of scripts out there to trim a string in javascript, but none how to Left Trim String.
This is what I use to trim:
String.prototype.trim = function() {
return this.replace(/^\s+|\s+$/g,"");
}
But I would like to change this a little and create a new function called leftTrim that only removes the leading space. My regex is pretty limited, so any help is much appreciated.
Cheers