[Base] Add wide version of split_path.
This commit is contained in:
parent
01c656b77b
commit
82f85c98f0
|
@ -169,6 +169,10 @@ std::vector<std::string> split_path(const std::string& path) {
|
||||||
return split_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,
|
std::string join_paths(const std::string& left, const std::string& right,
|
||||||
char sep) {
|
char sep) {
|
||||||
if (!left.size()) {
|
if (!left.size()) {
|
||||||
|
|
|
@ -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.
|
// 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::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.
|
// Joins two path segments with the given separator.
|
||||||
std::string join_paths(const std::string& left, const std::string& right,
|
std::string join_paths(const std::string& left, const std::string& right,
|
||||||
|
|
Loading…
Reference in New Issue