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

First Matching Position Function
String Searches Class

Public Function FirstMatchingPosition( _
      ByVal vOne As Variant _
    , ByVal vTwo As Variant _
    , Optional ByVal vCompare As Variant _
    ) As Variant

Returns the position of the first matching characters in corresponding positions of the two strings.

Examples:
    FirstMatchingPosition("AAABBBCCC", "CBAABCCBA") = 3
    FirstMatchingPosition("AAABBBCCC", "BBBCCC") = 0
See also:
    FirstNonMatchingPosition Function
    DifferenceString Function
    CompareStrings Function
vOne: One of the two strings from which characters in corresponding positions will be compared for a match. Function returns Null if vOne is Null or cannot be fixed up to a String.

vTwo: One of the two strings from which characters in corresponding positions will be compared for a match. Function returns Null if vTwo is Null or cannot be fixed up to a String.

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

Function returns 0 (zero) if no corresponding characters match.

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