View Single Post
  #4 (permalink)  
Old 06-17-2008, 05:58 PM
agraham's Avatar
agraham agraham is offline
Basic4ppc Expert
 
Join Date: Jul 2007
Location: Cheshire, UK
Posts: 1,903
Awards Showcase
Beta Tester Forum Contributer 
Total Awards: 2
Default

Quote:
Originally Posted by mjcoon View Post
In fact since I want a byte array initialised with hex values, HexToDec() (which returns a single number) is not really what I want. A version of StringToBytes() that copes with hex notation as well as doing the type coercion would be nearer the mark.

Similarly it is sometimes convenient to display a buffer's content as a string of hex characters, requiring the converse function.
I must be a mind reader. My next library, about to be posted when I have finished testing, may do what you want. It will be, I think, be a bit esoteric for most but it will do individual datatype to byte array and back conversions, including byte data represented as Hex strings.

Here's a preview to play with.
Attached Files
File Type: zip BytesConverterPreview.zip (11.7 KB, 15 views)
Reply With Quote