Get next token till end of input
| 710 | /// <param name="out"></param> |
| 711 | /// <returns></returns> |
| 712 | bool GetTokenNext(std::string& in, std::string delim, std::string& out) { |
| 713 | size_t pos = in.find(delim); |
| 714 | if (pos != std::string::npos) { |
| 715 | out = in.substr(0, pos); |
| 716 | in = in.substr(pos + delim.length(), in.length()); |
| 717 | } else { |
| 718 | out = in; |
| 719 | in = ""; |
| 720 | } |
| 721 | return !(in.empty() && out.empty()); |
| 722 | } |
| 723 | |
| 724 | /// returns next token, "" if done or first empty token |
| 725 | std::string TokenNext(std::string& in, std::string delim) { |
no test coverage detected