isascii, __isascii, iswascii
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at isascii, __isascii, iswascii.
Determines whether a particular character is an ASCII character.
Syntax
int __isascii(
int c
);
int iswascii(
wint_t c
);
#define isascii __isascii
Parameters
c
Integer to test.
Return Value
Each of these routines returns nonzero if c
is a particular representation of an ASCII character. __isascii
returns a nonzero value if c
is an ASCII character (in the range 0x00 – 0x7F). iswascii
returns a nonzero value if c
is a wide-character representation of an ASCII character. Each of these routines returns 0 if c
does not satisfy the test condition.
Remarks
Both __isascii
and iswascii
are implemented as macros unless the preprocessor macro _CTYPE_DISABLE_MACROS is defined.
For backward compatibility, isascii
is implemented as a macro only if __STDC__ is not defined or is defined as 0; otherwise it is undefined.
Generic-Text Routine Mappings
Tchar.h routine | _UNICODE and _MBCS not defined | _MBCS defined | _UNICODE defined |
---|---|---|---|
_istascii |
__isascii |
__isascii |
iswascii |
Requirements
Routine | Required header |
---|---|
isascii , __isascii |
C: <ctype.h> C++: <cctype> or <ctype.h> |
iswascii |
C: <wctype.h>, <ctype.h>, or <wchar.h> C++: <cwctype>, <cctype>, <wctype.h>, <ctype.h>, or <wchar.h> |
The isascii
, __isascii
and iswascii
functions are Microsoft specific. For additional compatibility information, see Compatibility in the Introduction.