CFLib.org – Common Function Library Project

struct([paramN])

Last updated August 22, 2007

author

Erki Esken

Version: 2 | Requires: CF6 | Library: DataManipulationLib

Description:
Now you can make simple or complex structures with a one-liner in CF, just like with built-in shorthand syntax in many other programming languages. You can create simple structures with ease, or nest Struct() functions to create complex, nested structures.

Return Values:
Returns a structure.

Example:

<cfdump var="#Struct(foo='bar',bar='foo',quux=Struct(one='1',two='2',three='3'))#">

Parameters:

Name Description Required
paramN This UDF accepts N optional arguments. Each argument is added to the returned structure. No

Full UDF Source:

/**
 * This functions helps to quickly build structures, both simple and complex.
 * v2 by Brendan Baldwin brendan.baldwin@gmail.com
 * 
 * @param paramN 	 This UDF accepts N optional arguments. Each argument is added to the returned structure. (Optional)
 * @return Returns a structure. 
 * @author Erki Esken (erki@dreamdrummer.com) 
 * @version 2, August 22, 2007 
 */
function struct() { return duplicate(arguments); }
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