tokenize.h 720 B

123456789101112131415161718192021222324252627282930
  1. // Filename: tokenize.h
  2. // Created by: drose (25Sep00)
  3. //
  4. ////////////////////////////////////////////////////////////////////
  5. #ifndef TOKENIZE_H
  6. #define TOKENIZE_H
  7. #include "ppremake.h"
  8. #include <vector>
  9. // A couple of handy functions for breaking up a string into tokens,
  10. // and repasting the tokens back into a string.
  11. void tokenize(const string &source, vector<string> &tokens,
  12. const string &delimiters);
  13. void tokenize_whitespace(const string &source, vector<string> &tokens);
  14. string repaste(const vector<string> &tokens, const string &separator);
  15. // And this is just handy to have.
  16. string trim_blanks(const string &str);
  17. // So is this.
  18. bool contains_whitespace(const string &str);
  19. #endif