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

Min Length Any Part Function
String Searches Class

Public Function MinLengthAnyPart( _
      ByVal vValue As Variant _
    , ByVal vPartSep As Variant _
    ) As Variant

"Minimum Length Any Part"
Return the minimum length of any part of the input string, after the string has been separated at each occurrence of the vPartSep string.

    MinLengthAnyPart("This" + vbCrLf + "is", vbCrLf) = 2
    MinLengthAnyPart("This is a test.", " ") = 1
    MinLengthAnyPart("This is", vbCrLf) = 7
Note: The separator string is not counted in the length of any of the parts.
Note: The lengths of the first segment of the string (the part between the beginning and the first occurrence of the separator) and the last segment of the string (between last occurrence of the separator and the end of the string) are checked--the function does not only check those string segments BETWEEN two separators.

vValue: The string containing the parts whose minimum length is to be returned. Function returns Null if rValue is Null or cannot be fixed up to a String.

vPartSep: The string which separates the parts of string vValue. Function returns Null if vPartSep is Null or cannot be fixed up to a String.
vCompare: Specifies the type of comparison used to determine if the separator string vPartSep appears within the string vValue. 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.