aboutsummaryrefslogtreecommitdiff
path: root/src/common/String.cpp
diff options
context:
space:
mode:
authorcrupest <crupest@outlook.com>2022-01-25 18:39:14 +0800
committercrupest <crupest@outlook.com>2022-01-25 18:39:14 +0800
commitd3aa43d9ea0dfc32935767cf60a89af2736dc339 (patch)
treee8cf043ac6d9a2e6ce038ad6b1f57079834ef129 /src/common/String.cpp
parent71c01a175a939d1a519ab235fdfdeec1101f8b84 (diff)
downloadcru-d3aa43d9ea0dfc32935767cf60a89af2736dc339.tar.gz
cru-d3aa43d9ea0dfc32935767cf60a89af2736dc339.tar.bz2
cru-d3aa43d9ea0dfc32935767cf60a89af2736dc339.zip
...
Diffstat (limited to 'src/common/String.cpp')
-rw-r--r--src/common/String.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/common/String.cpp b/src/common/String.cpp
index 62943059..e791d119 100644
--- a/src/common/String.cpp
+++ b/src/common/String.cpp
@@ -33,6 +33,10 @@ String String::FromUtf8(const char* str, Index size) {
return result;
}
+String String::FromStdPath(const std::filesystem::path& path) {
+ return String::FromUtf8(path.string());
+}
+
char16_t String::kEmptyBuffer[1] = {0};
String::String(const_pointer str) : String(str, GetStrSize(str)) {}