ns/releases/3.1.2/source/util/Tokenizer.h
puzl 73a03548a7 made a copy
git-svn-id: https://unknownworlds.svn.cloudforge.com/ns1@369 67975925-1194-0748-b3d5-c16f83f1a3a1
2005-11-28 18:13:35 +00:00

28 lines
794 B
C++

#ifndef TOKENIZER_H
#define TOKENIZER_H
/**************************************************************
Name: Tokenizer.h
Author: KJQ
Desc: Static class to provide tokenizer services for simple parsers.
Edits:
Bugs:
*************************************************************/
#include <util/StringVector.h>
#include <vector>
#include <string>
using std::string;
class Tokenizer
{
public:
// split separates the line into multiple pieces, discarding delimiters
// if quotechar is specified it's used to identify quoted strings.
static int split(const string& input, const string& delimiters, StringVector&, char quoteChar = 0);
private:
Tokenizer(); // prevent anybody from making one
~Tokenizer();
};
#endif //TOKENIZER_H