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

First Non Matching Character Function
String Searches Class

Public Function FirstNonMatchingCharacter( _
      ByVal vStartPos As Variant _
    , ByVal vLine As Variant _
    , ByVal vFindChars As Variant _
    , Optional ByVal vCompare As Variant _
    ) As Variant

Returns the first character within string vLine that does not match any of the characters within string vFindChars.

Like the InStrNotCharacters function except that it returns the character itself instead of the position of the non-match.
    FirstNonMatchingCharacter(1, "4455CBA", "45DEF") = "C"
    FirstNonMatchingCharacter(1, "4455CBA", "45ABCDEF") = ""
See also:
    FirstMatchingCharacter Function
    LastNonMatchingCharacter Function
    InStrNotCharacters Function
vStartPos: The position of the character in string vLine where the search is to begin. vStartPos defaults to 1 (one) if it is Null or cannot be fixed up to a number.

vLine: The string which is to be searched from left-to-right for characters that do not appear in string vFindChars. Function returns Null if vLine is Null or cannot be fixed up to a String.

vFindChars: String containing characters whose appearance within string vLine is to be ignored. Function returns Null if vFindChars is Null or cannot be fixed up to a String.

vCompare: Specifies the type of comparison used to determine if characters match. vCompare defaults to Binary comparisons if it is missing or Null or cannot be fixed up to a number.

Function returns an empty string if all of the characters within vLine also appear within vFindChars.

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