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