src/sys/dotnet/perwapi/PERWAPI.cs
/// <summary>
/// Derives a hexademical string for an unsigned int value
/// </summary>
/// <param name="num">the unsigned int value</param>
/// <returns>hex string for the unsigned int value</returns>
Derives a hexademical string for an unsigned int value
Derives a hexademical string for an unsigned int value
public static String Int(uint num) {
            char[] str = new char[8];
            int strIx = 7;
            for (int i=0; i < iByteMask.Length; i++) {
                uint b = num & iByteMask[i];
                b >>= (i*8);
                uint b1 = b & nibble0Mask;
                uint b2 = (b & nibble1Mask) >> 4;
                str[strIx--] = hexDigit[b1];
                str[strIx--] = hexDigit[b2];
            }
            return new String(str);
        }
public static String Int ( uint num ) { char [ ] str = new char [ 8 ] ; int strIx = 7 ; for ( int i = 0 ; i < iByteMask . Length ; i ++ ) { uint b = num & iByteMask [ i ] ; b >>= ( i * 8 ) ; uint b1 = b & nibble0Mask ; uint b2 = ( b & nibble1Mask ) >> 4 ; str [ strIx -- ] = hexDigit [ b1 ] ; str [ strIx -- ] = hexDigit [ b2 ] ; } return new String ( str ) ; }
Derives a hexademical string for an unsigned int value
Derives a hexademical string for an unsigned int value
hex string for the unsigned int value
hex string for the unsigned int value
num
uint
the unsigned int value
the unsigned int value