Flylib.com

Books Software

 
 
 

ListAppend

"-->

ListAppend

ListAppend (

list

,

value

[,

delimiters

])

Description

Adds a value to the end of a list.

Example

<cfset exampleList = "Apples, Oranges, Grapes, Pears, Mangoes"> 

<cfoutput> 
# ListAppend (exampleList, 'Cranberry')# 
</cfoutput>
"-->

ListChangeDelims

ListChangeDelims (

list

,

new_delimiter

[,

delimiters

])

Description

Allows for the change of a list delimiter .

Example

<cfset exampleList = "Apples, Oranges, Grapes, Pears, Mangoes"> 

<cfoutput> 
List with new delimiters: #ListChangeDelims(exampleList, '$$', ',')# 
</cfoutput>
"-->

ListContains

ListContains (

list

,

substring

[,

delimiters

])

Description

Determines the index of the first list element that contains a specific value.

Example

<cfset exampleList = "Apples, Oranges, Grapes, Pears, Mangoes"> 

<cfoutput> 
Oranges is the number # ListContains (exampleList, "Oranges")# in this list. 
</cfoutput>
"-->

ListContainsNoCase

ListContainsNoCase (

list

,

substring

[,

delimiters

])

Description

Searches for a value's index within a list that contains the substring.

Example

<cfset exampleList = "Apples, Oranges, Grapes, Pears, Mangoes"> 

<cfoutput> 
Oranges is the number #ListContainsNoCase(exampleList, "oranges")# in this list. 
</cfoutput>
"-->

ListDeleteAt

ListDeleteAt (

list

,

position

[,

delimiters

])

Description

Deletes an element from a list at the specified index position.

Example

<cfset exampleList = "Apples, Oranges, Grapes, Pears, Mangoes"> 

<cfoutput> 
Oranges is gone from the list: #ListDeleteAt(exampleList, 2)#. 
</cfoutput>
"-->

ListFind

ListFind (

list

,

value

[,

delimiters

])

Description

Determines the index of the first list element in which a specified value occurs. This is a case-sensitive search.

Example

<cfset exampleList = "Apples, apples, Oranges, Grapes, Pears, Mangoes"> 

<cfoutput> 
Apples is the number # ListFind(exampleList, "Apples")# element in the list. 
</cfoutput>
"-->

ListFindNoCase

ListFindNoCase (

list

,

value

[,

delimiters

])

Description

A non-case-sensitive index of the first list element in which a specified value occurs.

Example

<cfset exampleList = "apples, Apples, Oranges, Grapes, Pears, Mangoes"> 

<cfoutput> 
Apples is the number: # ListFind(exampleList, "Apples")# element in the list. 
</cfoutput>
"-->

ListFirst

ListFirst (

list

[,

delimiters

])

Description

Gets the first element of a list.

Example

<cfset exampleList = "Apples, Oranges, Grapes, Pears, Mangoes"> 

<cfoutput> 
#ListFirst(exampleList)# 
</cfoutput>
"-->

ListGetAt

ListGetAt (

list

,

position

[,

delimiters

])

Description

Returns a list element at the specified position in the parameters.

Example

<cfset exampleList = "Apples, Oranges, Grapes, Pears, Mangoes"> 

<cfoutput> 
#ListGetAt(exampleList, 3)# 
</cfoutput>
"-->

ListInsertAt

ListInsertAt (

list

,

position

,

value

[,

delimiters

])

Description

Inserts an element into a list at a specified index position.

Example

<cfset exampleList = "Apples, Oranges, Grapes, Pears, Mangoes"> 

<cfoutput> 
#ListInsertAt(exampleList, "3", "Cranberry")# 
</cfoutput>