Function String Numerics Class

StringCharactersBitwiseXorNumber

"String Characters Bitwise Exclusive Or Number" Perform the bitwise "Xor" ("Exclusive Or") operation on each of the characters within a string. The operation is performed between the number and each character within the string.

Signature (Visual Basic / VBA)

Public Function StringCharactersBitwiseXorNumber( _
      ByVal vString As Variant _
    , ByVal vNumber As Variant _
    ) As Variant

Code Examples

    StringCharactersBitwiseXorNumber("AB", 63) = Chr$(126) + Chr$(125) =  "~}"
    StringCharactersBitwiseXorNumber("AB", 234) = Chr$(171) + Chr$(168)
    XOR     Var2
             0 1
           +-----
    Var1 0 | 0 1
         1 | 1 0

Parameters

Parameter Description
vString String containing the characters which are each to be operated upon separately. Function returns Null if vValue is Null or cannot be fixed up to a String.
vNumber The number which is operated upon with each of the characters in string vString. Function returns vString unchanged if vNumber if Null or cannot be fixed up to a String.

Notes & Version History

Note vNumber should be between 0 (zero) and 255.