Remove Leading Zeros from a String

<cfscript>

function StripLZeros(s) {

// Removes Leading Zeros

return REReplace(s, "^0+", "" , "ALL");

}

 

 

// Usage

NewNumber = StripLZeros(0000243432004);

</cfscript>

  • 3 Users Found This Useful
Was this answer helpful?