The data in any of your files is stored in either ASCII text format or binary. The file object has two methods for converting from one format to the other.
Both methods, which follow, are static, so no object is required. The stringToByte method converts the first character of a string into a number. Characters after the first are ignored. The result is a numeric value to the first character or zero.The byteToString method converts a number into a one-character string. If the argument is not a string, the result is an empty string.
Leave a Reply
You must be logged in to post a comment.