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

Difference Characters Function
Character Arrays Class

Public Function DifferenceCharacters( _
      ByVal vStringOne As Variant _
    , ByVal vStringTwo As Variant _
    ) As Variant

Return a string containing all of the unique characters in vStringOne which are not in vStringTwo.
Each unique character in string vStringOne will appear at most once within the result string.
Relational difference operation on characters in a string.

Examples:
    DifferenceCharacters("FFEEDDCCBBAA", "ABBCCC") = "DEF"
    DifferenceCharacters("AABBCC", "") = "ABC"
    DifferenceCharacters(EveryCharacter, "ABBCCC") = CharactersNotInString("ABBCCC")
See also:
    CharactersNotInString Function
    IntersectCharacters Function
Note: Similar to the CharactersNotInString function except this function assumes that vStringOne will consists of all of the characters with ASCII values from 0 (zero) through 255.

vStringOne: String containing the characters of which the unique ones that do not also appear in vStringTwo will be copied to the result string. Function returns Null if vStringOne is Null or cannot be fixed up to a String.

vStringTwo: String containing the characters which will be excluded from the result string. will be copied to the result string. Function returns Null if vStringTwo is Null or cannot be fixed up to a String.

Note: Function uses the ASCII value of characters to determine if they match, which is in effect the same as using Binary comparisons.

Note: The characters in the result string are always returned in order by their ASCII value.

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