forked from panda3d/panda3d
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtokenize.h
More file actions
30 lines (19 loc) · 720 Bytes
/
tokenize.h
File metadata and controls
30 lines (19 loc) · 720 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
// Filename: tokenize.h
// Created by: drose (25Sep00)
//
////////////////////////////////////////////////////////////////////
#ifndef TOKENIZE_H
#define TOKENIZE_H
#include "ppremake.h"
#include <vector>
// A couple of handy functions for breaking up a string into tokens,
// and repasting the tokens back into a string.
void tokenize(const string &source, vector<string> &tokens,
const string &delimiters);
void tokenize_whitespace(const string &source, vector<string> &tokens);
string repaste(const vector<string> &tokens, const string &separator);
// And this is just handy to have.
string trim_blanks(const string &str);
// So is this.
bool contains_whitespace(const string &str);
#endif