13 Star 69 Fork 22

johnsonyl/cpps

加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
strnormalize.h 935 Bytes
一键复制 编辑 原始数据 按行查看 历史
johnsonyl 提交于 2021-01-23 02:58 +08:00 . 2021-01-23 更新
/**
* Copyright(c) 2012-2013, All Rights Reserved.
*
* @file strnormalize.h
* @details Check GBK character you could do
* code >= 0x8000 && _pGbk2Utf16[code - 0x8000] != 0
* @author cnangel
* @version 1.0.0
* @date 2012/10/09 11:44:58
*/
#ifndef __STRNORMALIZE_H__
#define __STRNORMALIZE_H__
#ifdef _WIN32
#pragma warning(disable: 6292)
#pragma warning(disable: 4819)
#endif
#ifdef __cplusplus
extern "C" {
#endif
#define SNO_TO_LOWER 1
#define SNO_TO_UPPER 2
#define SNO_TO_HALF 4
#define SNO_TO_SIMPLIFIED 8
void str_normalize_init();
void str_normalize_gbk(char *text, unsigned options);
void str_normalize_utf8(char *text, unsigned options);
int gbk_to_utf8(const char *from, unsigned int from_len, char **to, unsigned int *to_len);
int utf8_to_gbk(const char *from, unsigned int from_len, char **to, unsigned int *to_len);
#ifdef __cplusplus
}
#endif
#endif /* __STRNORMALIZE_H__ */
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/cppscript/cpps.git
git@gitee.com:cppscript/cpps.git
cppscript
cpps
cpps
master

搜索帮助