| 104 | } |
| 105 | |
| 106 | std::vector<std::string> |
| 107 | SplitString(std::string const& str, std::string const& delim) |
| 108 | { |
| 109 | std::vector<std::string> token; |
| 110 | std::size_t b = str.find_first_not_of(delim); |
| 111 | std::size_t e = str.find_first_of(delim, b); |
| 112 | while (e > b) |
| 113 | { |
| 114 | token.emplace_back(str.substr(b, e - b)); |
| 115 | b = str.find_first_not_of(delim, e); |
| 116 | e = str.find_first_of(delim, b); |
| 117 | } |
| 118 | return token; |
| 119 | } |
| 120 | |
| 121 | #ifndef MAXPATHLEN |
| 122 | # define MAXPATHLEN 1024 |