[Base] Add wide version of split_path.

This commit is contained in:
gibbed 2019-08-04 06:47:09 -05:00
parent 01c656b77b
commit 82f85c98f0
2 changed files with 5 additions and 0 deletions

View File

@ -169,6 +169,10 @@ std::vector<std::string> split_path(const std::string& path) {
return split_string(path, "\\/");
}
std::vector<std::wstring> split_path(const std::wstring& path) {
return split_string(path, L"\\/");
}
std::string join_paths(const std::string& left, const std::string& right,
char sep) {
if (!left.size()) {

View File

@ -56,6 +56,7 @@ std::wstring to_absolute_path(const std::wstring& path);
// Splits the given path on any valid path separator and returns all parts.
std::vector<std::string> split_path(const std::string& path);
std::vector<std::wstring> split_path(const std::wstring& path);
// Joins two path segments with the given separator.
std::string join_paths(const std::string& left, const std::string& right,