53 myTosplit(tosplit), myPos(0) {
59 myTosplit(tosplit), myPos(0) {
60 prepare(tosplit, token, splitAtAllChars);
65 myTosplit(tosplit), myPos(0) {
77 char* buf =
new char[2];
78 buf[0] = (char) special;
145 int len = (int)token.length();
146 if (splitAtAllChars) {
149 while (beg < (
int)tosplit.length()) {
150 std::string::size_type end;
151 if (splitAtAllChars) {
152 end = tosplit.find_first_of(token, beg);
154 end = tosplit.find(token, beg);
156 if (end == std::string::npos) {
157 end = tosplit.length();
161 beg = (int)end + len;
162 if (beg == (
int)tosplit.length()) {
171 std::string::size_type len = tosplit.length();
172 std::string::size_type beg = 0;
173 while (beg < len && tosplit[beg] <=
SPACE) {
176 while (beg != std::string::npos && beg < len) {
177 std::string::size_type end = beg;
178 while (end < len && tosplit[end] >
SPACE) {
182 myLengths.push_back((
int)end - (
int)beg);
184 while (beg < len && tosplit[beg] <=
SPACE) {
191 std::vector<std::string>
193 std::vector<std::string> ret;
196 ret.push_back(
next());