Name
ListQualify
Synopsis
ListQualify(list, qualifier
[,delimiters
] [,elements
])
Places qualifiers (such as single or double quotes) around elements
of list
. An optional delimiter can be
specified if the list is delimited with a character other than the
comma (the default). Elements accepts All
or
Char
and specifies whether the function qualifies
all elements in the list (the default) or only list items made up of
alphabetic characters. Examples:
<cfset MyAlphaList = "Monday,Tuesday,Wednesday,Thursday,Friday,Saturday,Sunday"> <cfset MyAlphaNumericList = "1,Monday,2,Tuesday,3,Wednesday,4,Thursday,5,Friday,6,Saturday,7,Sunday"> <cfset MyQualifiedAlphaList = ListQualify(MyAlphaList, """")> <cfset MyQualifiedAlphaNumericList = ListQualify(MyAlphaNumericList, """", ',', 'CHAR')> <cfoutput> <b>Original Alpha List:</b> #MyAlphaList#<br> <b>Original AlphaNumeric List:</b> #MyAlphaNumericList#<br> <p><b>Qualified Alpha List:</b> #MyQualifiedAlphaList#<br> <b>Qualified AlphaNumeric List:</b> #MyQualifiedAlphaNumericList#<br> </cfoutput>
Get Programming ColdFusion MX, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.