C++ 標準庫之cctype
阿新 • • 發佈:2018-12-21
C++ 語言下標頭檔案:#include <cctype>說明: 字元處理庫功能一:字元測試1> 函式原型均為int isxxxx(int)2> 引數為int, 任何實參均被提升成整型3> 只能正確處理處於[0, 127]之間的值功能二:字元對映1> 函式原型為int toxxxx(int)2> 對引數進行檢測, 若符合範圍則轉換, 否則不變
備註說明:C語言下的此類功能標頭檔案是<ctype.h>以下是<cctype>標頭檔案的宣告:
[cpp] view plain copy print?- // 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
- 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 */