Re: [q-lang-users] Two proposed improvements to Q
Brought to you by:
agraef
From: John C. <co...@cc...> - 2008-01-21 04:24:38
|
Albert Graef scripsit: > John, I hope that this is what you had in mind. It still lacks the "... > and strings using a specified character code" part, though. Considering > that a byte string might actually contain character data in an arbitrary > encoding, it's not clear to me how that should be done, could you > elaborate please? What you've got looks good. For strings, I had something in mind like get_string Bytes EncodingName StartIndex EndIndex to decode a portion of a byte string into a string, and put_string Bytes EncodingName Index String to encode a string into a portion of a byte string. These allow you to process character data wherever it might exist in a binary sequence. However, the latter produces an unpredictable number of bytes, and might need to be supplemented with a factory byte_string EncodingName String -- You escaped them by the will-death John Cowan and the Way of the Black Wheel. co...@cc... I could not. --Great-Souled Sam http://www.ccil.org/~cowan |