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

Line Ends With Fast Function
String Searches Class

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

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

Examples:
    LineEndsWithFast("This is a test.", "TEST.", vbTextCompare) = True
    LineEndsWithFast("This is a test.", "IS", vbTextCompare) = False
    LineEndsWithFast("This is a test.", "", vbTextCompare) = True
vLine: The string whose end is checked to see if it matches string vFind.
vFind: The string which is to be searched for at the end 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.