Public Function LeftOfFirstMatch( _ ByVal vLine As Variant _ , ByVal vFind As Variant _ , Optional ByVal vCompare As Variant _ , Optional ByVal vIfNotFound As Variant _ ) As Variant
LeftOfFirstMatch("This is a test.", "is") = "Th" LeftOfFirstMatch("This is a test.", "sample") = "This is a test." LeftOfFirstMatch("This is a test.", "sample", Null, "Not found.") = "Not found." LeftOfFirstMatch("This is a test.", "") = ""See also:
LeftOfFirstMatchFast function LeftOfLastMatch Function RightOfFirstMatch FunctionvLine: The string which is to be searched from left-to-right for the appearance of string vFind. Function returns Null if vLine is Null or cannot be fixed up to a String.
vFind: The string which is to be searched for within string vLine. Function returns Null if vFind is Null or cannot be fixed up to a String.
Function returns an empty string if vFind is an empty string.
vCompare: Specifies the type of comparison used to determine if strings match. vCompare defaults to Binary comparisons if it is missing or Null or cannot be fixed up to a number.
vIfNotFound: The string which is to be returned if vFind does not appear within vLine. vIfNotFound defaults to vLine (i.e. the string is returned unchanged) if it is missing or Null or cannot be fixed up to a String.
Copyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.