CFLib.org – Common Function Library Project

versionThis(version)

Last updated June 12, 2003

author

Byron Bignell

Version: 2 | Requires: CF5 | Library: UtilityLib

Description:
This UDF increments a standard 3 place (0.0.0) version number from left to right in ascending order.

Return Values:
Returns a string.

Example:

<cfoutput>
#versionThis('1.9.9')# 
</cfoutput>

Parameters:

Name Description Required
version String in the form of a version number, as in x.x.x. Yes

Full UDF Source:

/**
 * Increments the values of a 3 place version number.
 * Version 2 by Raymond Camden
 * 
 * @param version 	 String in the form of a version number, as in x.x.x. (Required)
 * @return Returns a string. 
 * @author Byron Bignell (byronj@bignell.com) 
 * @version 2, June 12, 2003 
 */
function versionThis(str){
	str = replace(str,".","","all") + 1;
	str = left(str,len(str) - 2) & "." & mid(str,len(str)-1,1) & "." & right(str,1);
	return str;
}
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