|
I have a routine to convert a string of characters into a string containing the hex codes for those characters. If you feed it the string '123', it returns the string 'F1F2F3'. The routine utilizes a compile time table that has 256 entries, each two bytes in length. The value of each incoming character is used as an index into the array to produce the outgoing character. Since the routine only does array lookups by index, I perceive it to be fairly fast. However, I don't really care for the memory requirement of this function, the CTDATA array takes 512 bytes, and of course all of the data is in sequence. If you have a favorite 'convert to hex string' routine, or perhaps there is a nice bif already, please let me know about it. Regards, Rich
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.