CFLib.org – Common Function Library Project

CreateGUID()

Last updated July 17, 2001
Download UDF

author

Nathan Dintenfass                                 Nathan Dintenfass

Version: 1 | Requires: ColdFusion 5 | Library: StrLib

 
Rated 15 time(s). Average Rating: 4.9

Description:
Modifies the CF CreateUUID() function to return a UUID in the form that Microsoft uses.

Return Values:
Returns a string.

Example:

<CFOUTPUT>
CreateGUID returns #CreateGUID()#<BR>
</CFOUTPUT>

Parameters:

No arguments.

Full UDF Source:

<cfscript>
/**
* Returns a UUID in the Microsoft form.
*
* @return Returns a string.
* @author Nathan Dintenfass (nathan@changemedia.com)
* @version 1, July 17, 2001
*/

function CreateGUID() {
    return insert("-", CreateUUID(), 23);
}
</cfscript>

Search CFLib.org


Latest Additions

Tony Blackmon Tony Blackmon added
generatePassword
6 hour(s) ago

Ben Garrett Ben Garrett added
isRFC3339
7 hour(s) ago

Raymond Camden Raymond Camden added
romanToDecimal
4 day(s) ago

Joe Rinehart Joe Rinehart added
directoryCopy
4 day(s) ago

Top Rated

Nick Giovanni                                     UniqueValueList
Rated 5.0, 5 time(s)

James Sleeman                                     QuickSort
Rated 5.0, 3 time(s)

Bobby Hartsfield                                  randStr
Rated 5.0, 3 time(s)

Rob Brooks-Bilson                                 FolderSize
Rated 5.0, 3 time(s)

Created by Raymond Camden / Design by Justin Johnson