52 myTosplit(tosplit), myPos(0) {
58 myTosplit(tosplit), myPos(0) {
59 prepare(tosplit, token, splitAtAllChars);
64 myTosplit(tosplit), myPos(0) {
76 char* buf =
new char[2];
77 buf[0] = (char) special;
144 int len = (int)token.length();
145 if (splitAtAllChars) {
148 while (beg < (
int)tosplit.length()) {
149 std::string::size_type end;
150 if (splitAtAllChars) {
151 end = tosplit.find_first_of(token, beg);
153 end = tosplit.find(token, beg);
155 if (end == std::string::npos) {
156 end = tosplit.length();
160 beg = (int)end + len;
161 if (beg == (
int)tosplit.length()) {
170 std::string::size_type len = tosplit.length();
171 std::string::size_type beg = 0;
172 while (beg < len && tosplit[beg] <=
SPACE) {
175 while (beg != std::string::npos && beg < len) {
176 std::string::size_type end = beg;
177 while (end < len && tosplit[end] >
SPACE) {
181 myLengths.push_back((
int)end - (
int)beg);
183 while (beg < len && tosplit[beg] <=
SPACE) {
190 std::vector<std::string>
192 std::vector<std::string> ret;
195 ret.push_back(
next());