xHarbour Reference Documentation > Function Reference |
Tests if tokens can still be found with TokenNext().
TokenEnd( [@<cTokenEnv>] ) --> lTokenEnd
The function returns .T. (true) when a new call to TokenNext() returns a token, otherwise .F. (false) is returned.
See also: | TokenInit(), TokenNext() |
Category: | CT:String manipulation , Character functions , Token functions |
Source: | ct\token2.c |
LIB: | xhb.lib |
DLL: | xhbdll.dll |
// The example is a typical usage scenario for TokenEnd(). It delivers // the termination condition for extracting all tokens from a character // string within a DO WHILE loop. PROCEDURE Main LOCAL cPath := GetEnv( "PATH" ) LOCAL nCount := 0 TokenInit( @cPath, ";" ) DO WHILE .NOT. TokenEnd() ? ++nCount, TokenNext( @cPath ) ENDDO TokenExit() RETURN
http://www.xHarbour.com