42 lines
868 B
C++
42 lines
868 B
C++
//
|
|
// Created on 2024-05-17.
|
|
//
|
|
|
|
#ifndef UTF_CONVERT_H
|
|
#define UTF_CONVERT_H
|
|
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
namespace utfcvt {
|
|
|
|
std::u16string UTF8ToUTF16(std::string_view utf8);
|
|
|
|
std::u32string UTF8ToUTF32(std::string_view utf8);
|
|
|
|
std::string UTF16ToUTF8(std::u16string_view utf16);
|
|
|
|
std::u32string UTF16ToUTF32(std::u16string_view utf16);
|
|
|
|
std::string UTF32ToUTF8(std::u32string_view utf32);
|
|
|
|
std::u16string UTF32ToUTF16(std::u32string_view utf32);
|
|
|
|
std::string UTF16ToModifiedUTF8(std::u16string_view utf16);
|
|
|
|
std::u16string ModifiedUTF8ToUTF16(std::string_view mutf8);
|
|
|
|
// 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
|