SyntaxFix
Write A Post
Hire A Developer
Questions
Try this,
function ltrim(str, chars) { chars = chars || "\\s"; return str.replace(new RegExp("^[" + chars + "]+", "g"), ""); } var str =ltrim("01545878","0");
More here