• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint

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>

PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint