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

Strip Matching End Line Fast Verify Sub
String Replacements Class

Private Sub StripMatchingEndLineFastVerify()
    'Test the StripMatchingEndLineFast function.

    Debug.Assert StripMatchingEndLineFast("Abc", "", vbBinaryCompare) = "Abc" ' Behavior #1

    Debug.Assert StripMatchingEndLineFast("AbcDefAbc", "Abc", vbBinaryCompare) = "AbcDef" ' Behavior #2
    Debug.Assert StripMatchingEndLineFast("AbcDefAbc", "ABC", vbBinaryCompare) = "AbcDefAbc"
    Debug.Assert StripMatchingEndLineFast("AbcDefAbc", "Abc", vbTextCompare) = "AbcDef"
    Debug.Assert StripMatchingEndLineFast("AbcDefAbc", "ABC", vbTextCompare) = "AbcDef"

    Debug.Assert StripMatchingEndLineFast("AbcDefGhi", "Abc", vbBinaryCompare) = "AbcDefGhi" ' General Behavior
    Debug.Assert StripMatchingEndLineFast("AbcDefGhi", "Def", vbBinaryCompare) = "AbcDefGhi"
    Debug.Assert StripMatchingEndLineFast("AbcDefGhi", "Ghi", vbBinaryCompare) = "AbcDef"

End Sub

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