attoken( ) Function

Description:
  The attoken() function returns the offset of the nOccur occurrence of a token delimined by cDelims within cDest. The cDelims parameter can contain a string of multiple delimiters. If the token is not found, -1 is returned.  

Syntax:
  retval = attoken( cDest, cDelims, nOccur )

Parameters:
  string: cDest String to search in.
  string: cDelims Delimiters to search for.
  numeric: nOccur Occurrence of cDelims to look for.
  numeric: retval The offset within cDest of the nOccur token delimited by cDelims or -1 if not found.

Platforms:
  Windows, DOS, Internet Active Pages



Example:

	local var1, var2, var3, retval          // Variables
	var1 = {a,b,c,a,b,c,a,b,c,a,b,c}	// Search String
	var2 = prompt( "Pick a,b or c", "", 1 )
	var3 = prompt( "Pick a number 1 to 4", "", 1)
	retval = attoken( var1, var2, var3 )
	
	println( retval )

  

(c) 2000-2001 by West Coast Web Adventures, Inc., All Rights Reserved