It should be a new functon. read_hstring reads a hollerith-style (or pascal style) string. That is, a length followed by that many bytes, incidentally the reverse of add_hstring.
A function that reads to the next null character is totally different. Also, read_hstring(0) intentionally returns an empty string, this because it makes most sense (read 0 bytes length (will be 0), then that many characters (0)).
So, it has to be a new function (match works, incidentally, but might be somewhat slow of course).
On Sat, Sep 13, 2014 at 12:43 PM, Stephen R. van den Berg srb@cuci.nl wrote:
Stephen R. van den Berg wrote:
a. Perform it when called as read_hstring(0);
After reviewing the options, choice a seems most friendly to me.
Stephen.