46 : myTosplit(tosplit), myPos(0) {
53 prepare(tosplit, token, splitAtAllChars);
70 char* buf =
new char[2];
71 buf[0] = (char) special;
132 int len = (int)token.length();
133 if (splitAtAllChars) {
136 while (beg < (
int)tosplit.length()) {
137 std::string::size_type end;
138 if (splitAtAllChars) {
139 end = tosplit.find_first_of(token, beg);
141 end = tosplit.find(token, beg);
143 if (end == std::string::npos) {
144 end = tosplit.length();
148 beg = (int)end + len;
149 if (beg == (
int)tosplit.length()) {
157 std::string::size_type len = tosplit.length();
158 std::string::size_type beg = 0;
159 while (beg < len && tosplit[beg] <=
SPACE) {
162 while (beg != std::string::npos && beg < len) {
163 std::string::size_type end = beg;
164 while (end < len && tosplit[end] >
SPACE) {
168 myLengths.push_back((
int)end - (
int)beg);
170 while (beg < len && tosplit[beg] <=
SPACE) {
177 std::vector<std::string>
179 std::vector<std::string> ret;
182 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)