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

Max Corresponding Characters Function
String Searches Class

Public Function MaxCorrespondingCharacters( _
      ByVal vCompare As Variant _
    , ParamArray vStrings() As Variant _
    ) As Variant

"Maximum Corresponding Characters"
Return a string where each character represents the maximum ASCII value of the characters in the corresponding position within all of the string arguments.
Will return the character from the first string with the maximum value if many characters tie for the maximum.

Examples:
    MaxCorrespondingCharacters(vbTextCompare, "12345ABCDE", "ABCDE67890") = "ABCDEABCDE"
    MaxCorrespondingCharacters(vbTextCompare, "abcDEF", "ABCdef") = "abcDEF"
    MaxCorrespondingCharacters(vbTextCompare, "123456", "789") = "789"
vCompare: Specifies the type of comparison used to determine if characters in corresponding positions match. vCompare defaults to Binary comparisons if it is missing or Null or cannot be fixed up to a number.

vStrings: One or more string whose corresponding character positions are to be examined. Function returns Null if any argument is Null or cannot be fixed up to a String.

Function only compares corresponding characters up to the length of the shortest string--any characters in positions beyond the length of the shortest string are ignored.

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