August 2001
Intermediate to advanced
976 pages
38h 8m
English
GetToken
GetToken(string, index[,delimiters])
Returns the token from string occupying
the specified index position. An optional
set of delimiters may be specified. If no
delimiters are specified, ColdFusion uses
the default of spaces, tabs, and newline characters. If
index is greater than the total number of
tokens in string, GetToken( ) returns an empty string. GetToken( )
is similar in function to the ListGetAt( )
function but is more versatile because it uses multiple sets of
delimiters. Note that the
GetToken( ) function currently treats successive
instances of the same delimiter as a single delimiter. Here’s
an example of this function:
<CFSET MyString="999-99-9999"> <CFOUTPUT> <B>String:</B> #MyString# <P>GetToken(MyString, 3, "-"): #GetToken(MyString, 3, "-")# </CFOUTPUT>
Read now
Unlock full access