| 379 | } |
| 380 | |
| 381 | std::string fromNativeSeparators(const std::string &pathName) |
| 382 | { |
| 383 | #if defined(__NATRON_WIN32__) |
| 384 | std::size_t i = pathName.find_first_of("\\"); |
| 385 | if (i != std::string::npos) { |
| 386 | std::string n(pathName); |
| 387 | n[i++] = '/'; |
| 388 | |
| 389 | for (; i < n.length(); ++i) { |
| 390 | if (n[i] == '\\') |
| 391 | n[i] = '/'; |
| 392 | } |
| 393 | |
| 394 | return n; |
| 395 | } |
| 396 | #endif |
| 397 | return pathName; |
| 398 | } |
| 399 | |
| 400 | std::vector<std::string> split(const std::string &text, char sep) { |
| 401 | std::vector<std::string> tokens; |
no test coverage detected