Huh, I forgot multibyte characters... Then would this be sufficient?
Character>>hex value >255 ifTrue: [^value hex] ifFalse: [^value printStringBase: 16 nDigits: 2]
geoffroy we cannot really change hex because hex returns 16rXXX and the other classes are consistent with that. (Character value: 12345) hex '16r3039' Integer>>hex "Print the receiver as hex, prefixed with 16r. DO NOT CHANGE THIS! The Cog VMMaker depends on this. Consider using any of printStringHex printStringBase: 16 printStringBase: 16 length: 8 padded: true storeStringHex storeStringBase: 16 storeStringBase: 16 length: 11 padded: true" ^self storeStringBase: 16 Now what we could have is another method named: xxPrintStringHex for example (first name that came to my mind) paddedPrintStringHex 1566 printStringHex '61E' 15 printStringHex 'F' 1566 paddedPrintStringHex '61E' 15 paddedPrintStringHex '0F' Or something like that. Stef