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

Strip Matching Begin Line Function
String Replacements Class

Public Function StripMatchingBeginLine( _
      ByVal vLine As Variant _
    , ByVal vFind As Variant _
    , Optional ByVal vCompare As Variant _
    ) As Variant

Strip vFind from vLine only if it appears at the beginning of vLine, otherwise return the string vLine unchanged.

Examples:
    StripMatchingBeginLine("This is a test.", "This") = " is a test."
    StripMatchingBeginLine("This is a test.", " is ") = "This is a test.
    StripMatchingBeginLine("This is a test.", "") = "This is a test.
See also:
    StripMatchingBeginLineFast Function
    LineBeginsWith Function
    StripFirstMatch Function
    StripMatchingEndLine Function
vLine: The string whose beginning is to be removed if it matches string vFind. Function returns Null if vLine is Null or cannot be fixed up to a String (Behavior #1).

vFind: The string which is to be removed from the beginning of vLine if present. Function returns Null if vFind is Null or cannot be fixed up to a String (Behavior #2). Function returns vLine unchanged if vFind is an empty string (Behavior #3).

vCompare: Specifies the type of comparison used to determine if the strings match (Behavior #4). vCompare defaults to Binary comparisons if it is missing or Null or cannot be fixed up to a number (Behavior #5).

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