| 398 | |
| 399 | template <class T> |
| 400 | static inline void Split(char* buf, char ch, T* res) { |
| 401 | res->resize(0); |
| 402 | if (*buf == 0) { |
| 403 | return; |
| 404 | } |
| 405 | |
| 406 | TCharDelimiter<char> delim(ch); |
| 407 | TSimplePusher<T> pusher = {res}; |
| 408 | |
| 409 | SplitString(buf, delim, pusher); |
| 410 | } |
| 411 | |
| 412 | /// Split string into res vector. Res vector is cleared before split. |
| 413 | /// Old good slow split function. |