From 1f6ee990275f412d4cc84483051fd549710da634 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Mon, 1 Jan 2018 09:40:08 +0100 Subject: Add config parsing for cmake cmake has not integrated yet, but it will parse... Add test script to easily run tests --- src/FileUtil.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/FileUtil.cpp') diff --git a/src/FileUtil.cpp b/src/FileUtil.cpp index e53aa85..2626ee3 100644 --- a/src/FileUtil.cpp +++ b/src/FileUtil.cpp @@ -23,6 +23,11 @@ namespace sibs { return utf8Str; } + + FileString toFileString(const StringView &utf8Str) + { + return FileString(utf8Str.data, utf8Str.size); + } #else std::string toUtf8(const sibs::FileString &input) { @@ -57,6 +62,13 @@ namespace sibs { return utf8To16(utf8Str); } + + FileString toFileString(const StringView &utf8Str) + { + FileString result; + utf8::utf8to16(utf8Str.data, utf8Str.data + utf8Str.size, std::back_inserter(result)); + return result; + } FileString getLastErrorAsString() { -- cgit v1.2.3