#include "CDMUtilities.h"
#include<vector>
+#include<string>
namespace CDMUtilities
{
{
if (empties == no_empties)
{
- next = s.find_first_not_of( delimiters, next + 1 );
- if (next == Container::value_type::npos) break;
+ next = s.find_first_not_of(delimiters, next + 1);
+ if (next == Container::value_type::npos)
+ {
+ break;
+ }
next -= 1;
}
current = next + 1;
- next = s.find_first_of( delimiters, current );
- result.push_back( s.substr( current, next - current ) );
+ next = s.find_first_of(delimiters, current);
+ result.push_back(s.substr(current, next - current));
}
while (next != Container::value_type::npos);
return result;
}
- const std::string& fixPath(const std::string& path)
+ const std::string fixPath(const std::string& path)
{
std::string pathFixed = "";
- #if(_WIN32)
+#if(_WIN32)
// ------ Windows
//TODO: implementation for windows
- #else
+#else
// ------ LINUX / MacOS
//break path into folders
std::vector<std::string> pathSlpit;
- splitter::split(pathSlpit, path, "\"/", splitter::no_empties);
+
+ splitter::split(pathSlpit, path, "/", splitter::no_empties);
+
for (int i = 0; i < pathSlpit.size(); i++)
{
- std::cout << pathSlpit[i];
pathFixed += "/" + pathSlpit[i];
}
- #endif
+#endif
return pathFixed;
}