A tokenizer for buffers, a la strtok