* Skip data until the first occurrence of 'str'. * @param str Separator string. * @param sep Whether to also skip 'str'. */
| 731 | * @param sep Whether to also skip 'str'. |
| 732 | */ |
| 733 | void SkipUntil(std::string_view str, SeparatorUsage sep) |
| 734 | { |
| 735 | assert(!str.empty()); |
| 736 | this->Skip(this->Find(str)); |
| 737 | switch (sep) { |
| 738 | default: |
| 739 | break; |
| 740 | case READ_ONE_SEPARATOR: |
| 741 | case SKIP_ONE_SEPARATOR: |
| 742 | this->SkipIf(str); |
| 743 | break; |
| 744 | case READ_ALL_SEPARATORS: |
| 745 | case SKIP_ALL_SEPARATORS: |
| 746 | while (this->ReadIf(str)) {} |
| 747 | break; |
| 748 | } |
| 749 | } |
| 750 | |
| 751 | /** |
| 752 | * Peek data until the first occurrence of 8-bit char 'c'. |