aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/include
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2020-10-04 10:50:19 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2020-10-04 10:50:19 +0300
commite3fc06afd790b0fab3d31e6a81d75ccc0d7bb1e9 (patch)
tree4189a9241f7463a2bd51c16071a878f5319a18e3 /include
parentinitial commit (diff)
downloadwinapi-utf8-e3fc06afd790b0fab3d31e6a81d75ccc0d7bb1e9.tar.gz
winapi-utf8-e3fc06afd790b0fab3d31e6a81d75ccc0d7bb1e9.zip
add string conversion functions + some tests
Diffstat (limited to '')
-rw-r--r--include/winapi/utf8.hpp22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/winapi/utf8.hpp b/include/winapi/utf8.hpp
new file mode 100644
index 0000000..1eb6963
--- /dev/null
+++ b/include/winapi/utf8.hpp
@@ -0,0 +1,22 @@
+// Copyright (c) 2020 Egor Tensin <Egor.Tensin@gmail.com>
+// This file is part of the "winapi-utf8" project.
+// For details, see https://github.com/egor-tensin/winapi-utf8.
+// Distributed under the MIT License.
+
+#pragma once
+
+#include <cstddef>
+#include <string>
+#include <vector>
+
+namespace winapi {
+
+std::wstring widen(const std::string&);
+std::wstring widen(const std::vector<unsigned char>&);
+std::wstring widen(const void*, std::size_t nb);
+
+std::string narrow(const std::wstring&);
+std::string narrow(const std::vector<unsigned char>&);
+std::string narrow(const void*, std::size_t nb);
+
+}