Post

 Resources 

Console


RE: Converting String to Byte and back & David Carl (0 replies, 0 views) (2000-May-29)
-
You could change each character into a number (use a byte - 0 to 255) and save each number, the numbers could be the letters character code, or a number from an encryption algorithm that you could create. Before you write your list of numbers (1 string) you'll have to write a byte for the length of the string. Then when reading just read the length descriptor and loop through the next X bytes reading each number and converting it back into a letter, then add it to a variable defined as string. Hope this is easy enough to understand, if there are any easy methods then please post them because I'll be interested, but this is the method I use.


-
Up One Level | Back to Forum


Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.
There have been 68 visitors within the last 20 minutes
RSS News Feed