I am looking for a stand alone tokenizer written in C that can parse and split strings based on user supplied character separator such as tabs, semi colons, commas etc. Similar to what this boost library function does
http://www.boost.org/doc/libs/1_46_1/libs/tokenizer/escaped_list_separator.htm The tokens may be double quoted and the separators may be embedded, em开发者_Go百科pty tokens are not skippedYou can use strtok
in string.h
. You certainly will have to adapt it to manage specifics. As it is C, be careful about null-terminated strings.
精彩评论