TokenNum()
Get the total number of tokens in a token environment
Syntax
TokenNum( [<@cTokenEnvironment>] ) -> nNumberofTokens
Arguments
<@cTokenEnvironment> a token environment
Returns
<nNumberofTokens> number of tokens in the token environment
Description
The TokenNum() function can be used to retrieve the total number of tokens in a token environment. If the parameter <@cTokenEnvironment> is supplied (must be by reference), the information from this token environment is used, otherwise the global token environment is used.
Examples
tokeninit( "a.b.c.d", ".", 1 ) // initialize global token environment ? TokenNum() // --> 4
Compliance
TokenNum() is a new function in Harbour’s CT3 library.
Platforms
All
Files
Source is token2.c, library is libct.
Seealso
TOKENINIT(), TOKENEXIT(), TOKENNEXT(), TOKENAT(), SAVETOKEN(), RESTTOKEN(), TOKENEND()
Pingback: Harbour String Functions | Viva Clipper !
Pingback: Harbour All Functions – T | Viva Clipper !