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

String Characters Bitwise And Number Function
String Numerics Class

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

Perform the bitwise "And" operation on each of the characters within a string.
The operation is performed between the number and each character within the string.

Truth table:
    AND     Var2
             0 1
    Var1 0 | 0 0
         1 | 0 1
    StringCharactersBitwiseAndNumber(Chr$(193) + Chr$(194), 127) = Chr$(65) + Chr$(66) = "AB"
    StringCharactersBitwiseAndNumber("BC",  31) = Chr$(2) + Chr$(3)
    StringCharactersBitwiseAndNumber("BC", 128) = Chr$(0) + Chr$(0)
See also:
    StringCharactersBitwiseOrNumber Function
    StringCharactersBitwiseXorNumber Function
    AndValues Function
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.
Note: vNumber should be between 0 (zero) and 255.

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