|
YSTest
PreAlpha_b500_20140530
The YSLib Test Project
|
字符编码处理。 更多...
#include "YModules.h"#include <CHRLib/chrmap.h>#include <YBaseMacro.h>#include <cstdio>#include <memory>#include <ystdex/string.hpp>#include <algorithm>

命名空间 | |
| CHRLib | |
函数 | |
| template<typename _tChar > | |
| yconstfn bool | CHRLib::IsASCII (_tChar c) |
| 判断整数类型字符在 ASCII 字符取值范围内。 更多... | |
| template<typename _tChar > | |
| yconstfn char | CHRLib::ToASCII (_tChar c) |
| 任意整数类型字符转换为 ASCII 取值范围兼容的字符。 更多... | |
| template<class _tString > | |
| std::basic_string< ucs2_t > | CHRLib::ucsdup (const _tString &str) |
| YF_API std::basic_string< ucs2_t > | CHRLib::ucsdup (const char *, Encoding=CS_Default) |
| 复制多字节字符串为 UCS-2 字符串。 更多... | |
| YF_API std::basic_string< ucs2_t > | CHRLib::ucsdup (const ucs2_t *) |
| 复制 UCS-2 字符串。 更多... | |
| YF_API std::basic_string< ucs2_t > | CHRLib::ucsdup (const ucs4_t *) |
| 复制 UCS-4 字符串为 UCS-2 字符串。 更多... | |
| template<class _tDst > | |
| _tDst | CHRLib::MakeUCS2LEString (const char *s, Encoding enc=CS_Default) |
| 复制指定编码的多字节字符串为指定类型的 UCS-2 字符串。 更多... | |
| template<class _tDst > | |
| _tDst | CHRLib::MakeUCS2LEString (const ucs2_t *s, Encoding=CharSet::ISO_10646_UCS_2) |
| 复制指定类型的 UCS-2 字符串。 更多... | |
| template<class _tDst > | |
| _tDst | CHRLib::MakeUCS2LEString (const ucs4_t *s, Encoding=CharSet::ISO_10646_UCS_4) |
| 复制 UCS-4 字符串为指定类型的 UCS-2 字符串。 更多... | |
| CHRLib::c | |
| CHRLib::enc | |
| std::FILE | CHRLib::Encoding |
| std::FILE ConversionState | CHRLib::fp |
| YF_API ConversionResult | CHRLib::MBCToUC (ucs2_t &, const char *&, Encoding, ConversionState &&={}) |
| 按指定编码和转换状态转换字符串中字符为 UCS-2 字符,返回转换的字节数。 更多... | |
| CHRLib::PDefH (ConversionResult, MBCToUC, ucs2_t &uc, const char *&c, Encoding enc, ConversionState &st) ImplRet(MBCToUC(uc | |
| std::FILE ConversionState && | CHRLib::PDefH (ConversionResult, MBCToUC, ucs2_t &uc, std::FILE *fp, Encoding enc, ConversionState &st) ImplRet(MBCToUC(uc |
| std::FILE ConversionState ConversionState && | CHRLib::PDefH (ConversionResult, MBCToUC, const char *&c, Encoding enc, ConversionState &st) ImplRet(MBCToUC(c |
| CHRLib::PDefH (ConversionResult, MBCToUC, std::FILE *fp, Encoding enc, ConversionState &st) ImplRet(MBCToUC(fp | |
| YF_API size_t | CHRLib::MBCSToUCS2 (ucs2_t *, const char *, Encoding=CS_Default) |
| 按指定编码转换 MBCS 字符串为 UCS-2 字符串,返回转换的串长。 更多... | |
| YF_API size_t | CHRLib::UCS2ToMBCS (char *, const ucs2_t *, Encoding=CS_Default) |
| 按指定编码转换 UCS-2 字符串为 MBCS 字符串,返回转换的串长。 更多... | |
| YF_API size_t | CHRLib::UCS4ToUCS2 (ucs2_t *, const ucs4_t *) |
| 转换 UCS-4 字符串为 UCS-2 字符串,返回转换的串长。 更多... | |
| template<class _tDst , class _tSrc > | |
| _tDst | CHRLib::GetMBCSOf (const _tSrc &src, Encoding enc=CS_Default) |
| 取 UCS-2 字符串转换的指定编码的多字节字符串。 更多... | |
| YF_API std::string | CHRLib::strdup (const ucs2_t *, Encoding=CS_Default) |
| 复制 UCS-2 字符串为多字节字符串。 更多... | |
| template<class _tString > | |
| std::string | CHRLib::strdup (const _tString &str) |
字符编码处理。
在文件 chrproc.h 中定义.