aboutsummaryrefslogtreecommitdiff
path: root/zencore
diff options
context:
space:
mode:
Diffstat (limited to 'zencore')
-rw-r--r--zencore/filesystem.cpp3
-rw-r--r--zencore/include/zencore/string.h15
2 files changed, 16 insertions, 2 deletions
diff --git a/zencore/filesystem.cpp b/zencore/filesystem.cpp
index 591630b75..ec3de0306 100644
--- a/zencore/filesystem.cpp
+++ b/zencore/filesystem.cpp
@@ -443,7 +443,7 @@ WriteFile(std::filesystem::path Path, const IoBuffer* const* Data, size_t Buffer
}
}
-void
+void
WriteFile(std::filesystem::path Path, IoBuffer Data)
{
const IoBuffer* const DataPtr = &Data;
@@ -451,7 +451,6 @@ WriteFile(std::filesystem::path Path, IoBuffer Data)
WriteFile(Path, &DataPtr, 1);
}
-
FileContents
ReadFile(std::filesystem::path Path)
{
diff --git a/zencore/include/zencore/string.h b/zencore/include/zencore/string.h
index 684e27827..291b18043 100644
--- a/zencore/include/zencore/string.h
+++ b/zencore/include/zencore/string.h
@@ -605,6 +605,21 @@ HashStringDjb2(const std::string_view& InString)
//////////////////////////////////////////////////////////////////////////
+inline std::string
+ToLower(const std::string_view& InString)
+{
+ std::string Out(InString);
+
+ for (char& C : Out)
+ {
+ C = static_cast<char>(std::tolower(C));
+ }
+
+ return Out;
+}
+
+//////////////////////////////////////////////////////////////////////////
+
void string_forcelink(); // internal
} // namespace zen