<-- Previous || Up || Next -->

Get Token Function
String Searches Class

Public Function GetToken( _
      ByRef rValue As Variant _
    , ByVal vTokenSep As Variant _
    , Optional ByVal vCompare As Variant _
    ) As Variant

Remove the first token from the argument and return the token.
The tokens are separated by the string vTokenSep.

       Dim S As String
       S = "First,Second,Third"
    for example
       GetToken(S, ",") = "First"
       S = "Second,Third"
See also:
    GetTokenFast Function
    GetTokenCharSeps Function
    GetTokenAlphanumeric Function
    GetTokenNonSpace Function
    GetVBToken Function
    GetOpt Function
    strtok Function
    GetTokenSample Subroutine
rValue: The string containing the tokens of which the first is to be removed and returned. Function returns Null if rValue is Null or cannot be fixed up to a String.

vTokenSep: The string which separates the tokens within string rValue. Function returns Null if vTokenSep is Null or cannot be fixed up to a String.

If the token separator vTokenSep is an empty string, then the string rValue is considered to consist of a single token.

vCompare: Specifies the type of comparison used to determine if the token separator string vTokenSep appears within the string rValue. vCompare defaults to Binary comparisons if it is missing or Null or cannot be fixed up to a number.

Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.