CFLib.org – Common Function Library Project

StripLZero(Num)

Last updated September 13, 2001

author

Critter Gewlas

Version: 1 | Requires: CF5 | Library: StrLib

Description:
Strips leading zero's from a string or number.

Return Values:
Returns a string.

Example:

<cfoutput>
#stripLZero(0006325)#<br/>
#stripLZero("0631 Appleton Lane")#
</cfoutput>

Parameters:

Name Description Required
Num Number or string to be modified. Yes

Full UDF Source:

/**
 * Strips leading zero's from a string or number.
 * 
 * @param Num 	 Number or string to be modified. 
 * @return Returns a string. 
 * @author Critter Gewlas (critter@cfresume.org) 
 * @version 1, September 13, 2001 
 */
function StripLZero(s) {
	return REReplace(s,"^0","","ALL");
}
blog comments powered by Disqus

Search CFLib.org


Latest Additions

Kevin Cotton added
date2ExcelDate
May 5, 2016

Raymond Camden added
CapFirst
April 25, 2016

Chris Wigginton added
loremIpsum
January 18, 2016

Gary Stanton added
calculateArrival...
November 19, 2015

Sebastiaan Naafs - van Dijk added
getDaysInQuarter
November 13, 2015

Created by Raymond Camden / Design by Justin Johnson