[Q][Smalltalk][hex] converting binary to hex

Bob Arning arning at charm.net
Tue Mar 19 23:07:21 UTC 2002


On Tue, 19 Mar 2002 15:46:04 -0700 "Ken G. Brown" <kbrown at tnc.ab.ca> wrote:
>aByteArray _ #(0 15 16 255) asByteArray.
>aByteArray asHex. answers - a ByteArray(48 48 48 70 49 48 70 70)
>
>Any and all comments will be appreciated.

Ken,

Just curious - why do you want the result as a ByteArray rather than a String? Seems to me that a result of '000F10FF' is more palatable than a ByteArray(48 48 48 70 49 48 70 70).

Cheers,
Bob



More information about the Squeak-dev mailing list