C++ 标准库之cctype

C++ 语言下
头文件:#include <cctype>
说明: 字符处理库
功能一:字符测试
1> 函数原型均为int isxxxx(int)
2> 参数为int, 任何实参均被提升成整型
3> 只能正确处理处于[0, 127]之间的值
 
功能二:字符映射
1> 函数原型为int toxxxx(int)
2> 对参数进行检测, 若符合范围则转换, 否则不变

备注说明:C语言下的此类功能头文件是<ctype.h>
以下是<cctype>头文件的声明:

// cctype standard header
#pragma once
#ifndef _CCTYPE_
#define _CCTYPE_
#include <yvals.h>

#ifdef _STD_USING
 #undef _STD_USING
  #include <ctype.h>
 #define _STD_USING
#else /* _STD_USING */
 #include <ctype.h>
#endif /* _STD_USING */
#ifndef RC_INVOKED
 #if _GLOBAL_USING
_STD_BEGIN
using ::isalnum; using ::isalpha; using ::iscntrl;
using ::isdigit; using ::isgraph; using ::islower;
using ::isprint; using ::ispunct; using ::isspace;
using ::isupper; using ::isxdigit; using ::tolower;
using ::toupper;

_STD_END
 #endif /* _GLOBAL_USING */
#endif /* RC_INVOKED */
	/* remove any (improper) macro overrides */
#undef isalnum
#undef isalpha
#undef isblank
#undef iscntrl
#undef isdigit
#undef isgraph
#undef islower
#undef isprint
#undef ispunct
#undef isspace
#undef isupper
#undef isxdigit
#undef tolower
#undef toupper
#endif /* _CCTYPE_ */
/*
 * Copyright (c) 1992-2006 by P.J. Plauger.  ALL RIGHTS RESERVED.
 * Consult your license regarding permissions and restrictions.
 V5.02:0009 */

转载来源:http://blog.csdn.net/akof1314/article/details/4624245

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值