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

Strip Matching Begin Line Fast Function
String Replacements Class

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

Strip vFind from vLine only if it appears at the beginning of vLine, otherwise return the string vLine unchanged.
Faster version of the StripMatchingBeginLine function which uses restrictive argument types to avoid argument fix-up code.

Examples:
    StripMatchingBeginLineFast("This is a test.", "This", vbBinaryCompare) = " is a test."
    StripMatchingBeginLineFast("This is a test.", " is ", vbBinaryCompare) = "This is a test.
    StripMatchingBeginLineFast("This is a test.", "", vbBinaryCompare) = "This is a test. ' Behavior #1
See also:
    StripMatchingBeginLine Function
    LineBeginsWithFast Function
    StripMatchingEndLineFast Function
vLine: The string whose beginning is to be removed if it matches string vFind.
vFind: The string which is to be removed from the beginning of vLine if present. Function returns vLine unchanged if vFind is an empty string (Behavior #1).
vCompare: Specifies the type of comparison used to determine if the strings match (Behavior #2).

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