| 284 | } |
| 285 | |
| 286 | size_t string_first_of(const char* text, size_t start, size_t end, const char* delims) |
| 287 | { |
| 288 | for (auto index = start; index < end; index++) |
| 289 | { |
| 290 | auto pDelim = delims; |
| 291 | while (*pDelim != 0) |
| 292 | { |
| 293 | if (text[index] == *pDelim++) |
| 294 | { |
| 295 | return index; |
| 296 | } |
| 297 | } |
| 298 | } |
| 299 | return std::string::npos; |
| 300 | } |
| 301 | |
| 302 | void string_split_each(char* text, size_t startIndex, size_t endIndex, const char* delims, std::function<bool(size_t, size_t)> fn) |
| 303 | { |