mirror of
https://github.com/haproxy/haproxy.git
synced 2026-02-24 10:20:52 -05:00
For now we have co_getline() which reads a buffer and stops on LF, and co_getword() which reads a buffer and stops on one arbitrary delimiter. But sometimes we'd need to stop on a set of delimiters (CR and LF, etc). This patch adds a new function co_getdelim() which takes a set of delimiters as a string, and constructs a small map (32 bytes) that's looked up during parsing to stop after the first delimiter found within the set. It also supports an optional escape character that skips a delimiter (typically a backslash). For the rest it works exactly like the two other variants. |
||
|---|---|---|
| .. | ||
| haproxy | ||
| import | ||