From e3fc06afd790b0fab3d31e6a81d75ccc0d7bb1e9 Mon Sep 17 00:00:00 2001 From: Egor Tensin Date: Sun, 4 Oct 2020 10:50:19 +0300 Subject: add string conversion functions + some tests --- include/winapi/utf8.hpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 include/winapi/utf8.hpp (limited to 'include/winapi') 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 +// 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 +#include +#include + +namespace winapi { + +std::wstring widen(const std::string&); +std::wstring widen(const std::vector&); +std::wstring widen(const void*, std::size_t nb); + +std::string narrow(const std::wstring&); +std::string narrow(const std::vector&); +std::string narrow(const void*, std::size_t nb); + +} -- cgit v1.2.3