strparse.h 475 B

12345678910111213141516171819
  1. // strparse.h -- header for String_parse class
  2. class String_parse {
  3. public:
  4. int pos;
  5. std::string *str;
  6. void init(std::string *s) {
  7. str = s;
  8. pos = 0;
  9. }
  10. void skip_space();
  11. char peek();
  12. void get_nonspace_quoted(std::string &field);
  13. // get the remaining characters, skipping initial spaces and final return
  14. void get_remainder(std::string &field);
  15. };
  16. void string_escape(std::string &result, const char *s, const char *quote);