> And I only need it for "%s", which is to read the next whitespace delimited > token.
Then strscans or npeg will do the job. > Does npeg work on strings or just files? Check out <https://github.com/zevv/npeg#quickstart> . `npeg` works on strings, and so it works on files too.