Private Sub StripFirstMatchVerify()
'Test the StripFirstMatch function.
Debug.Assert IsNull(StripFirstMatch(Null, "bc")) ' Behavior #1
Debug.Assert IsNull(StripFirstMatch("Abc", Null)) ' Behavior #2
Debug.Assert StripFirstMatch("Abc", "") = "Abc" ' Behavior #3
Debug.Assert StripFirstMatch("AbcDefGhiDefGhi", "Def", vbBinaryCompare) = "AbcGhiDefGhi" ' Behavior #4
Debug.Assert StripFirstMatch("AbcDefGhiDefGhi", "DEF", vbBinaryCompare) = "AbcDefGhiDefGhi"
Debug.Assert StripFirstMatch("AbcDefGhiDefGhi", "Def", vbTextCompare) = "AbcGhiDefGhi"
Debug.Assert StripFirstMatch("AbcDefGhiDefGhi", "DEF", vbTextCompare) = "AbcGhiDefGhi"
Debug.Assert StripFirstMatch("AbcDefGhiDefGhi", "Def") = "AbcGhiDefGhi" ' Behavior #5
Debug.Assert StripFirstMatch("AbcDefGhiDefGhi", "DEF") = "AbcDefGhiDefGhi"
Debug.Assert StripFirstMatch("AbcDefGhiDefGhi", "DEF", Null) = "AbcDefGhiDefGhi"
Debug.Assert StripFirstMatch("AbcDefGhiDefGhi", "DEF", "Joe") = "AbcDefGhiDefGhi"
End SubCopyright 1996-1999 Entisoft
Entisoft Tools is a trademark of Entisoft.