Function String Searches Class

GetTokenCharSeps

"Get Token With Character Separators" Remove the first token from the argument and return the token. The tokens are separated by any of the characters within string vCharSeps.

Signature (Visual Basic / VBA)

Public Function GetTokenCharSeps( _
      ByRef rValue As Variant _
    , ByVal vCharSeps As Variant _
    , Optional ByVal vCompare As Variant _
    ) As Variant

Code Example

    Assuming
       Dim S As String
       S = "First,Second|Third"
    for example
       GetTokenCharSeps(S, "|,") = "First"
    leaves
       S = "Second|Third"

Parameters

Parameter Description
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.
vCharSeps The string containing the characters, any of which can act to separate tokens. Function returns Null if vCharSeps is Null or cannot be fixed up to a String. If the token separator characters string vCharsSeps is empty, then the string rLine is considered to consist of a single token.
vCompare Specifies the type of comparison used to determine if any of the token separator characters appear within the string rValue. vCompare defaults to Binary comparisons if it is missing or Null or cannot be fixed up to a number.