summaryrefslogtreecommitdiff
path: root/Source/Core/Common/StringUtil.h
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2019-06-21 18:07:59 +0200
committerJosJuice <josjuice@gmail.com>2019-06-21 18:34:21 +0200
commitc0a6fa5dcc5a1335ee9eeb940bdfc6934ed01656 (patch)
tree92aa7eb99fcea23b8c04a8b522ea217fc4e5368c /Source/Core/Common/StringUtil.h
parentf08aa2d842e980471d41992e7949c97c9661432d (diff)
Work around C++20 std::filesystem changes related to u8string
Diffstat (limited to 'Source/Core/Common/StringUtil.h')
-rw-r--r--Source/Core/Common/StringUtil.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/Core/Common/StringUtil.h b/Source/Core/Common/StringUtil.h
index 0ee2391e7c..a1adf70b28 100644
--- a/Source/Core/Common/StringUtil.h
+++ b/Source/Core/Common/StringUtil.h
@@ -14,6 +14,11 @@
#include "Common/CommonTypes.h"
+#ifdef _MSC_VER
+#include <filesystem>
+#define HAS_STD_FILESYSTEM
+#endif
+
std::string StringFromFormatV(const char* format, va_list args);
std::string StringFromFormat(const char* format, ...)
@@ -153,6 +158,11 @@ inline std::string UTF8ToTStr(const std::string& str)
#endif
+#ifdef HAS_STD_FILESYSTEM
+std::filesystem::path StringToPath(std::string_view path);
+std::string PathToString(const std::filesystem::path& path);
+#endif
+
// Thousand separator. Turns 12345678 into 12,345,678
template <typename I>
std::string ThousandSeparate(I value, int spaces = 0)