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;
}

Search CFLib.org


Latest Additions

Raymond Camden added
QueryDeleteRows
November 04, 2017

Leigh added
nullPad
May 11, 2016

Raymond Camden added
stripHTML
May 10, 2016

Kevin Cotton added
date2ExcelDate
May 05, 2016

Raymond Camden added
CapFirst
April 25, 2016

Created by Raymond Camden / Design by Justin Johnson