Files
NandPartitionTableConvert/utf_convert.h
2024-05-17 21:40:15 +08:00

38 lines
746 B
C++

//
// Created on 2024-05-17.
//
#ifndef UTF_CONVERT_H
#define UTF_CONVERT_H
#include <string>
#include <string_view>
namespace utfcvt {
std::string UTF16ToUTF8(std::u16string_view utf16);
std::u16string UTF8ToUTF16(std::string_view utf8);
std::u32string UTF8ToUTF32(std::string_view utf8);
std::string UTF32ToUTF8(std::u32string_view utf32);
std::u32string UTF16ToUTF32(std::u16string_view utf16);
std::u16string UTF32ToUTF16(std::u32string_view utf32);
// for windows, they are not implemented on linux
std::wstring UTF8ToWide(std::string_view utf8);
std::string WideToUTF8(std::wstring_view wide);
std::wstring UTF16ToWide(std::u16string_view utf16);
std::u16string WideToUTF16(std::wstring_view wide);
}
#endif //UTF_CONVERT_H