D
Dennis Lee Bieber
Am 24.09.2012 23:49, schrieb Dave Angel:
Negative indices.
Which still doesn't handle the third seek mode -- relative to
current position.
I don't think I've ever written code to seek from the end of a file
-- but moving /x/-bytes from where the file currently is makes more
sense... For example, implementing chunked reading of a text file;
instead of handling a dangling partial line by holding it and appending
the next chunked read, one could use string methods to find the offset
of the last new-line marker relative to the length of the chunk and do a
relative seek backwards to position the next chunk at the start of that
partial line.