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

Line Begins With Fast Function
String Searches Class

Public Function LineBeginsWithFast( _
      ByRef vLine As String _
    , ByRef vFind As String _
    , ByRef vCompare As VbCompareMethod _
    ) As Boolean

Returns True if the string vLine begins with the string vFind.
Faster version of the LineBeginsWith function which uses restrictive argument types to avoid argument fix-up code.

Examples:
    LineBeginsWithFast("This is a test.", "THIS", vbTextCompare) = True
    LineBeginsWithFast("This is a test.", "IS", vbTextCompare) = False
    LineBeginsWithFast("This is a test.", "", vbTextCompare) = True
vLine: The string whose beginning is checked to see if it matches string vFind.
vFind: The string which is to be searched for at the beginning of string vLine.
vCompare: Specifies the type of comparison used to determine if the strings match.

Note: Unlike most other string search functions, this one returns True if vFind is an empty string.

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