The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.
We recommend using Visual Studio 2017

isascii, __isascii, iswascii


The new home for Visual Studio documentation is Visual Studio 2017 Documentation on

The latest version of this topic can be found at isascii, __isascii, iswascii.

Determines whether a particular character is an ASCII character.

int __isascii(   
   int c   
int iswascii(   
   wint_t c   
#define isascii __isascii  


Integer to test.

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.

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
RoutineRequired header
isascii, __isasciiC: <ctype.h>

C++: <cctype> or <ctype.h>
iswasciiC: <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.

Character Classification
is, isw Routines