|
dl
|
编码转换 更多...
命名空间 | |
| namespace | dl |
| namespace | dl::CodeCvt |
| 字符编码转换 | |
| namespace | dl::CodeCvt::Utf8 |
| utf8编码 | |
函数 | |
| Buffer | dl::CodeCvt::CvtString (std::string_view from, std::string_view to, BufferView buf) |
| iconv的简单封装,请使用更具体的函数。 | |
| int | dl::CodeCvt::Utf8::Check (std::string_view str) |
| 返回是否是utf-8编码 | |
| size_t | dl::CodeCvt::Utf8::Sub (std::string_view str, size_t max) |
| utf-8的子串计算 | |
| void | dl::CodeCvt::Utf8::Copy (char *target, size_t size, std::string_view source, bool show_log=true) |
| utf-8的安全复制 | |
| std::string | dl::CodeCvt::Utf8ToMultiByte (std::string_view str, std::string_view code_page="") |
| 字符串转换:utf8 -> 本地编码 | |
| std::wstring | dl::CodeCvt::Utf8ToWideChar (std::string_view str) |
| 字符串转换:utf8 -> 宽字符 | |
| std::u32string | dl::CodeCvt::Utf8ToUtf32 (std::string_view str) |
| 字符串转换:utf8 -> utf32 | |
| std::string | dl::CodeCvt::MultiByteToUtf8 (std::string_view str, std::string_view code_page="") |
| 字符串转换:本地编码 -> utf8 | |
| std::string | dl::CodeCvt::MultiByteToUtf8 (const char *str, std::string_view code_page="") |
| 字符串转换:本地编码 -> utf8 | |
| std::string | dl::CodeCvt::WideCharToUtf8 (std::wstring_view str) |
| 字符串转换:宽字符 -> utf8 | |
| std::string | dl::CodeCvt::Utf32ToUtf8 (std::u32string_view str) |
| 字符串转换:utf32 -> utf8 | |
变量 | |
| constexpr size_t | dl::CodeCvt::SIZE_BUFFER_STRING_CONVERT = 1024 |
| 编码转换缓冲区大小,越大使用更多的内存,但会更快 | |
编码转换
在文件 dl_code_cvt.h 中定义.