src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// Derives a hexademical string for a byte value
/// </summary>
/// <param name="b">the byte value</param>
/// <returns>hex string for the byte value</returns>
Derives a hexademical string for a byte value
Derives a hexademical string for a byte value
public static String Byte(int b) {
            char[] str = new char[2];
            uint num = (uint)b;
            uint b1 = num & nibble0Mask;
            uint b2 = (num & nibble1Mask) >> 4;
            str[0] = hexDigit[b2];
            str[1] = hexDigit[b1];
            return new String(str);
        }
public static String Byte ( int b ) { char [ ] str = new char [ 2 ] ; uint num = ( uint ) b ; uint b1 = num & nibble0Mask ; uint b2 = ( num & nibble1Mask ) >> 4 ; str [ 0 ] = hexDigit [ b2 ] ; str [ 1 ] = hexDigit [ b1 ] ; return new String ( str ) ; }
Derives a hexademical string for a byte value
Derives a hexademical string for a byte value
hex string for the byte value
hex string for the byte value
b
int
the byte value
the byte value