__isascii, iswascii
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here. ArchiveDisclaimer

__isascii, iswascii

int __isascii( 
   int c 
);
int iswascii( 
   wint_t c 
);

Each of these routines returns nonzero if c is a particular representation of an ASCII character.

Parameter

c
Integer to test.

Return Value

__isascii returns a non-zero value if c is an ASCII character (in the range 0x00 – 0x7F). iswascii returns a non-zero 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.

The result of the test condition for the __isascii function depends on the LC_CTYPE category setting of the current locale; see setlocale for more information. For iswascii, the result of the test condition is independent of locale.

Generic-Text Routine Mappings

TCHAR.H routine _UNICODE & _MBCS not defined _MBCS defined _UNICODE defined
_istascii isascii isascii iswascii

Requirements

Routine Required header Compatibility
__isascii <ctype.h> Win 98, Win Me, Win NT, Win 2000, Win XP
iswascii <ctype.h> or <wchar.h> ANSI, Win 98, Win Me, Win NT, Win 2000, Win XP

For additional compatibility information, see Compatibility in the Introduction.

Libraries

All versions of the C run-time libraries.

See Also

Character Classification Routines | Locale Routines | is, isw Function Overview | Run-Time Routines and .NET Framework Equivalents

Show:
© 2016 Microsoft