initial commit
This commit is contained in:
37
utf_convert.h
Normal file
37
utf_convert.h
Normal file
@@ -0,0 +1,37 @@
|
||||
//
|
||||
// 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
|
||||
Reference in New Issue
Block a user