Skip to Main Content
Programming ColdFusion MX, 2nd Edition
book

Programming ColdFusion MX, 2nd Edition

by Rob Brooks-Bilson
August 2003
Intermediate to advanced content levelIntermediate to advanced
1140 pages
68h 45m
English
O'Reilly Media, Inc.
Content preview from Programming ColdFusion MX, 2nd Edition

Name

GetToken

Synopsis

                  
                  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>
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Programming ColdFusion

Programming ColdFusion

Rob Brooks-Bilson

Publisher Resources

ISBN: 0596003803Supplemental ContentErrata Page