From 810d8bd0a53da99b2936c817d6473b829f3ed532 Mon Sep 17 00:00:00 2001 From: Amos Jeffries Date: Sun, 1 Jun 2014 06:53:17 -0700 Subject: [PATCH] Document token() behaviour at end-of-buffer --- src/parser/Tokenizer.h | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/parser/Tokenizer.h b/src/parser/Tokenizer.h index 9436e9f19c..93796fb25b 100644 --- a/src/parser/Tokenizer.h +++ b/src/parser/Tokenizer.h @@ -36,9 +36,14 @@ public: /** Basic strtok(3): * Skips all leading delimiters (if any), * accumulates all characters up to the next delimiter (a token), and - * skips all trailing delimiters (if any). + * skips all trailing delimiters. * * Want to extract delimiters? Use prefix() instead. + * + * At least one terminating delimiter is required. \0 may be passed + * as a delimiter to treat end of buffer content as the end of token. + * + * \return false if no terminal delimiter is found. */ bool token(SBuf &returnedToken, const CharacterSet &delimiters); -- 2.47.2