From 82f85c98f084dd010f8d7ade48bf65650ab0d7ba Mon Sep 17 00:00:00 2001 From: gibbed Date: Sun, 4 Aug 2019 06:47:09 -0500 Subject: [PATCH] [Base] Add wide version of split_path. --- src/xenia/base/string.cc | 4 ++++ src/xenia/base/string.h | 1 + 2 files changed, 5 insertions(+) diff --git a/src/xenia/base/string.cc b/src/xenia/base/string.cc index 44b3ce6c5..804127c6d 100644 --- a/src/xenia/base/string.cc +++ b/src/xenia/base/string.cc @@ -169,6 +169,10 @@ std::vector split_path(const std::string& path) { return split_string(path, "\\/"); } +std::vector 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()) { diff --git a/src/xenia/base/string.h b/src/xenia/base/string.h index a61a98d4c..1ce7dafeb 100644 --- a/src/xenia/base/string.h +++ b/src/xenia/base/string.h @@ -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 split_path(const std::string& path); +std::vector 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,