1 string sx; 2 * 3 sx = ultox(0); //0x0 4 assert( sx == "00"c ); 5 * 6 sx = ultox(255); //0xFF 7 assert( sx == "FF"c ); 8 sx = ultox(171); //0xAB 9 assert( sx == "AB"c ); 10 sx = ultox(43981); //0xABCD 11 assert( sx == "ABCD"c ); 12 sx = ultox(169004288); //0xA12CD00 13 assert( sx == "0A12CD00"c ); 14 sx = ultox(0xA12CD00); //169004288 15 assert( sx == "0A12CD00"c ); 16 17 sx = ultox(ulong.max); //0xFFFFFFFFFFFFFFFF 18 assert( sx == "FFFFFFFFFFFFFFFF"c );
Accepts any positive number from 0 to 18,446,744,073,709,551,615 and the returns an even number of hex strings up to 16 characters (from 0x0 to 0xFFFFFFFFFFFFFF). * Authors : David 'SpottedTiger' L. Davis Created : 04.May.05 *