MCPcopy Create free account
hub / github.com/NatronGitHub/Natron / fromNativeSeparators

Function fromNativeSeparators

Global/StrUtils.cpp:381–398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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;

Callers 2

convertCharArrayFunction · 0.85
setupPythonEnvFunction · 0.85

Calls 1

lengthMethod · 0.80

Tested by

no test coverage detected