52 : myTosplit(tosplit), myPos(0) {
59 prepare(tosplit, token, splitAtAllChars);
76 char* buf =
new char[2];
77 buf[0] = (char) special;
138 int len = (int)token.length();
139 if (splitAtAllChars) {
142 while (beg < (
int)tosplit.length()) {
143 std::string::size_type end;
144 if (splitAtAllChars) {
145 end = tosplit.find_first_of(token, beg);
147 end = tosplit.find(token, beg);
149 if (end == std::string::npos) {
150 end = tosplit.length();
154 beg = (int)end + len;
155 if (beg == (
int)tosplit.length()) {
163 std::string::size_type len = tosplit.length();
164 std::string::size_type beg = 0;
165 while (beg < len && tosplit[beg] <=
SPACE) {
168 while (beg != std::string::npos && beg < len) {
169 std::string::size_type end = beg;
170 while (end < len && tosplit[end] >
SPACE) {
174 myLengths.push_back((
int)end - (
int)beg);
176 while (beg < len && tosplit[beg] <=
SPACE) {
182 std::vector<std::string>
184 std::vector<std::string> ret;
187 ret.push_back(
next());
static const int WHITECHARS
std::string get(int pos) const
void prepare(const std::string &tosplit, const std::string &token, bool splitAtAllChars)
std::vector< std::string > getVector()
void prepareWhitechar(const std::string &tosplit)