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

Strip String Verify Sub
String Replacements Class

Private Sub StripStringVerify()
    'Test the StripString function.

    Debug.Assert IsNull(StripString(Null, "Abc")) ' Behavior #1
    
    Debug.Assert IsNull(StripString("Abc", Null)) ' Behavior #2

    Debug.Assert StripString("Abc", "") = "Abc" ' Behavior #3

    Debug.Assert StripString("AbcDefAbc", "Abc", vbBinaryCompare) = "Def" ' Behavior #4
    Debug.Assert StripString("AbcDefAbc", "ABC", vbBinaryCompare) = "AbcDefAbc"
    Debug.Assert StripString("AbcDefAbc", "Abc", vbTextCompare) = "Def"
    Debug.Assert StripString("AbcDefAbc", "ABC", vbTextCompare) = "Def"

    Debug.Assert StripString("AbcDefAbc", "Abc") = "Def" ' Behavior #5
    Debug.Assert StripString("AbcDefAbc", "ABC") = "AbcDefAbc"
    Debug.Assert StripString("AbcDefAbc", "ABC", Null) = "AbcDefAbc"
    Debug.Assert StripString("AbcDefAbc", "ABC", "Joe") = "AbcDefAbc"

End Sub

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