YSTest  PreAlpha_b400_20130424
The YSLib Test Project
 全部  命名空间 文件 函数 变量 类型定义 枚举 枚举值 友元 宏定义  
chrproc.cpp 文件参考

字符编码处理。 更多...

#include "CHRLib/chrproc.h"
#include "CHRLib/MapEx.h"
#include <cctype>
#include <cstdlib>
#include <cwchar>
#include <ystdex/cstdio.h>
#include <ystdex/cstring.h>
#include "CHRLib/Convert.hpp"
chrproc.cpp 的引用(Include)关系图:

浏览源代码.

函数

ConversionResult MBCToUC (ucs2_t &uc, const char *&c, Encoding enc, ConversionState &&st)
 
ConversionResult MBCToUC (ucs2_t &uc, std::FILE *fp, Encoding enc, ConversionState &&st)
 
ConversionResult MBCToUC (const char *&c, Encoding enc, ConversionState &&st)
 
ConversionResult MBCToUC (std::FILE *fp, Encoding enc, ConversionState &&st)
 
size_t UCToMBC (char *d, const ucs2_t &s, Encoding enc)
 
size_t MBCSToUCS2 (ucs2_t *d, const char *s, Encoding enc)
 
size_t UCS2ToMBCS (char *d, const ucs2_t *s, Encoding enc)
 
size_t UCS4ToUCS2 (ucs2_t *d, const ucs4_t *s)
 
char * strdup (const ucs2_t *s, Encoding enc)
 
ucs2_t * ucsdup (const char *s, Encoding enc)
 复制多字节字符串为 UCS-2/UTF-16LE 字符串。
 
ucs2_t * ucsdup (const ucs2_t *str)
 
ucs2_t * ucsdup (const ucs4_t *s)
 

详细描述

字符编码处理。

版本
r1160
作者
FrankHB frank.nosp@m.hb19.nosp@m.89@gm.nosp@m.ail..nosp@m.com
自从
早于 build 132
创建时间:
2009-11-17 17:53:21 +0800
修改时间:
2013-04-24 14:31 +0800
文本编码:
UTF-8
模块名称:
CHRLib::CharacterProcessing

在文件 chrproc.cpp 中定义.

函数说明

size_t MBCSToUCS2 ( ucs2_t *  d,
const char *  s,
Encoding  enc 
)

在文件 chrproc.cpp110 行定义.

参考 CHRLib::ConvertCharacter(),FetchMapperPtr(),ystdex::is_null() , 以及 yconstraint.

参考自 platform::u16getcwd_n() , 以及 ucsdup().

函数调用图:

这是这个函数的调用关系图:

ConversionResult MBCToUC ( ucs2_t &  uc,
const char *&  c,
Encoding  enc,
ConversionState &&  st 
)

在文件 chrproc.cpp48 行定义.

参考 CHRLib::ConvertCharacter() , 以及 FetchMapperPtr().

函数调用图:

ConversionResult MBCToUC ( ucs2_t &  uc,
std::FILE *  fp,
Encoding  enc,
ConversionState &&  st 
)

在文件 chrproc.cpp56 行定义.

参考 CHRLib::ConvertCharacter(),FetchMapperPtr() , 以及 yconstraint.

函数调用图:

ConversionResult MBCToUC ( const char *&  c,
Encoding  enc,
ConversionState &&  st 
)

在文件 chrproc.cpp72 行定义.

参考 CHRLib::ConvertCharacter() , 以及 FetchMapperPtr().

函数调用图:

ConversionResult MBCToUC ( std::FILE *  fp,
Encoding  enc,
ConversionState &&  st 
)

在文件 chrproc.cpp80 行定义.

参考 CHRLib::ConvertCharacter(),FetchMapperPtr() , 以及 yconstraint.

函数调用图:

char* strdup ( const ucs2_t *  s,
Encoding  enc 
)

在文件 chrproc.cpp160 行定义.

参考 ystdex::ntctslen(),UCS2ToMBCS() , 以及 yconstraint.

函数调用图:

size_t UCS2ToMBCS ( char *  d,
const ucs2_t *  s,
Encoding  enc 
)

在文件 chrproc.cpp130 行定义.

参考 FetchMapperPtr(),ystdex::is_null() , 以及 yconstraint.

参考自 CHRLib::GetMBCSOf() , 以及 strdup().

函数调用图:

这是这个函数的调用关系图:

size_t UCS4ToUCS2 ( ucs2_t *  d,
const ucs4_t *  s 
)

在文件 chrproc.cpp145 行定义.

参考 ystdex::is_null() , 以及 yconstraint.

参考自 ucsdup().

函数调用图:

这是这个函数的调用关系图:

ucs2_t* ucsdup ( const char *  ,
Encoding  = CS_Default 
)

复制多字节字符串为 UCS-2/UTF-16LE 字符串。

前置条件
断言: 指针参数非空 。
注解
空间由 std::free 释放。
自从
build 291

在文件 chrproc.cpp172 行定义.

参考 MBCSToUCS2(),YB_LIKELY , 以及 yconstraint.

函数调用图:

ucs2_t* ucsdup ( const ucs2_t *  str)

在文件 chrproc.cpp183 行定义.

参考 ystdex::ntctslen(),YB_LIKELY , 以及 yconstraint.

函数调用图:

ucs2_t* ucsdup ( const ucs4_t *  s)

在文件 chrproc.cpp195 行定义.

参考 ystdex::ntctslen(),UCS4ToUCS2(),YB_LIKELY , 以及 yconstraint.

函数调用图:

size_t UCToMBC ( char *  d,
const ucs2_t &  s,
Encoding  enc 
)

在文件 chrproc.cpp97 行定义.

参考 FetchMapperPtr() , 以及 yconstraint.

函数调用图: