CBlueUI  
C++ 跨平台跨框架的数据可视化工具
载入中...
搜索中...
未找到
CCoreCharFunction.h 文件参考

类型定义

typedef char32_t ucs4_t
 

函数

UI_EXP char * stristr (const char *inBuffer, const char *inSearchStr, int max_count=-1)
 ASCII查找子串(忽略大小写)
 
UI_EXP WCHARwcsistr (const WCHAR *inBuffer, const WCHAR *inSearchStr, int max_count=-1)
 Wide Char查找子串(忽略大小写)
 
UI_EXP int mbclen_utf8 (const char *p)
 获取utf8字符占用字节数
 
UI_EXP int mbclen_utf16 (const WCHAR *p)
 获取utf16字符占用字节数。utf16编码在性能和内存两方面最为平衡。
 
UI_EXP size_t mbslen_utf8 (const char *p)
 获取utf8字符个数(符号个数,符号可以是一个字母,一个汉字,一个数学标记,一个表情) 在使用时请与字节数区分开来。对于ASCII字符而言,字节数和字符个数相等。对于其它语言。字节数大于字符个数。
 
UI_EXP size_t wcsclen_char16 (const WCHAR *s)
 ucs-2符号个数
 
UI_EXP size_t wcslen_char16 (const WCHAR *s)
 ucs-2字节个数
 
UI_EXP int wcsncmp_char16 (const WCHAR *s1, const WCHAR *s2, size_t count)
 比较两个字符
 
UI_EXP int wcscmp_char16 (const WCHAR *s1, const WCHAR *s2)
 比较两个字符
 
UI_EXP int wcsnicmp_char16 (const WCHAR *s1, const WCHAR *s2, size_t count)
 比较两个字符(忽略大小写)
 
UI_EXP int wcsicmp_char16 (const WCHAR *s1, const WCHAR *s2)
 比较两个字符(忽略大小写)
 
UI_EXP WCHARwcschr_char16 (const WCHAR *str, WCHAR ch)
 
UI_EXP WCHARwcsrchr_char16 (const WCHAR *str, WCHAR ch)
 
UI_EXP WCHARwcsstr_char16 (const WCHAR *wcs1, const WCHAR *wcs2)
 
UI_EXP double wcstod_char16 (WCHAR const *str, WCHAR **endptr)
 
UI_EXP long long wcstoll_char16 (WCHAR const *str, WCHAR **endptr, int base)
 
UI_EXP int swscanf_char16 (const WCHAR *buffer, const WCHAR *format,...)
 
UI_EXP int vswscanf_char16 (const WCHAR *buffer, const WCHAR *format, va_list arg)
 
UI_EXP int snprintf_char16 (WCHAR *s, size_t n, const WCHAR *format,...)
 
UI_EXP int vsnprintf_char16 (WCHAR *s, size_t n, const WCHAR *format, va_list arg)
 
UI_EXP int fctprintf_char16 (void(*out)(WCHAR ch, void *arg), void *arg, const WCHAR *format,...)
 
UI_EXP int vfwprintf_char16 (FILE *fp, const WCHAR *format, va_list va)
 
UI_EXP void init_conv_type (char_conv_type &conv, UINT from_cp, UINT to_cp)
 
UI_EXP int conv_chars (const char_conv_type &conv, const char *utf8str, int slen, char *outbuf, int outsize)
 
UI_EXP int conv_utf8_to_utf16 (const char *utf8str, int slen, WCHAR *outbuf, int osize)
 
UI_EXP int conv_utf16_to_utf8 (const WCHAR *wstr, int wlen, char *outbuf, int osize)
 
UI_EXP int conv_unicode_to_utf8 (const ucs4_t *wstr, int wlen, char *outbuf, int osize)
 
UI_EXP int conv_utf8_to_unicode (const char *utf8str, int slen, ucs4_t *outbuf, int osize)
 

类型定义说明

◆ ucs4_t

typedef char32_t ucs4_t

函数说明

◆ conv_chars()

UI_EXP int conv_chars ( const char_conv_type &  conv,
const char *  utf8str,
int  slen,
char *  outbuf,
int  outsize 
)

◆ conv_unicode_to_utf8()

UI_EXP int conv_unicode_to_utf8 ( const ucs4_t wstr,
int  wlen,
char *  outbuf,
int  osize 
)

◆ conv_utf16_to_utf8()

UI_EXP int conv_utf16_to_utf8 ( const WCHAR wstr,
int  wlen,
char *  outbuf,
int  osize 
)

◆ conv_utf8_to_unicode()

UI_EXP int conv_utf8_to_unicode ( const char *  utf8str,
int  slen,
ucs4_t outbuf,
int  osize 
)

◆ conv_utf8_to_utf16()

UI_EXP int conv_utf8_to_utf16 ( const char *  utf8str,
int  slen,
WCHAR outbuf,
int  osize 
)

◆ fctprintf_char16()

UI_EXP int fctprintf_char16 ( void(*)(WCHAR ch, void *arg)  out,
void *  arg,
const WCHAR format,
  ... 
)

◆ init_conv_type()

UI_EXP void init_conv_type ( char_conv_type &  conv,
UINT  from_cp,
UINT  to_cp 
)

◆ mbclen_utf16()

UI_EXP int mbclen_utf16 ( const WCHAR p)

获取utf16字符占用字节数。utf16编码在性能和内存两方面最为平衡。

◆ mbclen_utf8()

UI_EXP int mbclen_utf8 ( const char *  p)

获取utf8字符占用字节数

◆ mbslen_utf8()

UI_EXP size_t mbslen_utf8 ( const char *  p)

获取utf8字符个数(符号个数,符号可以是一个字母,一个汉字,一个数学标记,一个表情) 在使用时请与字节数区分开来。对于ASCII字符而言,字节数和字符个数相等。对于其它语言。字节数大于字符个数。

◆ snprintf_char16()

UI_EXP int snprintf_char16 ( WCHAR s,
size_t  n,
const WCHAR format,
  ... 
)

◆ stristr()

UI_EXP char * stristr ( const char *  inBuffer,
const char *  inSearchStr,
int  max_count = -1 
)

ASCII查找子串(忽略大小写)

参数
inBuffer被查找目标字符串
inSearchStr要查找对象
max_count当 > 0 时,表示最大循环次数;当<=0时,表示以终止符\0结尾
返回
char* 返回子串在目标字符串中的位置指针

◆ swscanf_char16()

UI_EXP int swscanf_char16 ( const WCHAR buffer,
const WCHAR format,
  ... 
)

◆ vfwprintf_char16()

UI_EXP int vfwprintf_char16 ( FILE *  fp,
const WCHAR format,
va_list  va 
)

◆ vsnprintf_char16()

UI_EXP int vsnprintf_char16 ( WCHAR s,
size_t  n,
const WCHAR format,
va_list  arg 
)

◆ vswscanf_char16()

UI_EXP int vswscanf_char16 ( const WCHAR buffer,
const WCHAR format,
va_list  arg 
)

◆ wcschr_char16()

UI_EXP WCHAR * wcschr_char16 ( const WCHAR str,
WCHAR  ch 
)

◆ wcsclen_char16()

UI_EXP size_t wcsclen_char16 ( const WCHAR s)

ucs-2符号个数

◆ wcscmp_char16()

UI_EXP int wcscmp_char16 ( const WCHAR s1,
const WCHAR s2 
)

比较两个字符

参数
s1,s2两个字符串
返回
int: s1 < s2 ==> -1
s1 == s2 ==> 0
s1 > s2 ==> 1

◆ wcsicmp_char16()

UI_EXP int wcsicmp_char16 ( const WCHAR s1,
const WCHAR s2 
)

比较两个字符(忽略大小写)

参数
s1,s2两个字符串
返回
int: s1 < s2 ==> -1
s1 == s2 ==> 0
s1 > s2 ==> 1

◆ wcsistr()

UI_EXP WCHAR * wcsistr ( const WCHAR inBuffer,
const WCHAR inSearchStr,
int  max_count = -1 
)

Wide Char查找子串(忽略大小写)

参数
inBuffer被查找目标字符串
inSearchStr要查找对象
max_count当 > 0 时,表示最大循环次数;当<=0时,表示以终止符\0结尾
返回
WCHAR* 返回子串在目标字符串中的位置指针

◆ wcslen_char16()

UI_EXP size_t wcslen_char16 ( const WCHAR s)

ucs-2字节个数

◆ wcsncmp_char16()

UI_EXP int wcsncmp_char16 ( const WCHAR s1,
const WCHAR s2,
size_t  count 
)

比较两个字符

参数
s1,s2两个字符串
count最大比较次数
返回
int: s1 < s2 ==> -1
s1 == s2 ==> 0
s1 > s2 ==> 1

◆ wcsnicmp_char16()

UI_EXP int wcsnicmp_char16 ( const WCHAR s1,
const WCHAR s2,
size_t  count 
)

比较两个字符(忽略大小写)

参数
s1,s2两个字符串
count最大比较次数
返回
int: s1 < s2 ==> -1
s1 == s2 ==> 0
s1 > s2 ==> 1

◆ wcsrchr_char16()

UI_EXP WCHAR * wcsrchr_char16 ( const WCHAR str,
WCHAR  ch 
)

◆ wcsstr_char16()

UI_EXP WCHAR * wcsstr_char16 ( const WCHAR wcs1,
const WCHAR wcs2 
)
参数
wcs1被查找目标字符串–大小写敏感
wcs2要查找对象
返回
WCHAR* 返回子串在目标字符串中的位置

◆ wcstod_char16()

UI_EXP double wcstod_char16 ( WCHAR const *  str,
WCHAR **  endptr 
)

◆ wcstoll_char16()

UI_EXP long long wcstoll_char16 ( WCHAR const *  str,
WCHAR **  endptr,
int  base 
)
鄂公网安备42018502007752 鄂ICP备2024082886
Copyright © 2025 · CBlueStudio 版权所有