description | title | ms.date | api_name | api_location | api_type | topic_type | f1_keywords | helpviewer_keywords | ms.assetid | ||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Learn more about: toascii, __toascii |
toascii, __toascii |
11/04/2016 |
|
|
|
|
|
|
a07c0608-b0e2-4da2-a20c-7b64d6a9b77c |
Converts characters to 7-bit ASCII by truncation.
int __toascii(
int c
);
#define toascii __toascii
c
Character to convert.
__toascii
converts the value of c
to the 7-bit ASCII range and returns the result. There's no return value reserved to indicate an error.
The __toascii
routine converts the given character to an ASCII character by truncating it to the low-order 7 bits. No other transformation is applied.
The __toascii
routine is defined as a macro unless the preprocessor macro _CTYPE_DISABLE_MACROS
is defined. For backward compatibility, toascii
is defined as a macro only when __STDC__
isn't defined or is defined as 0; otherwise it's undefined.
Routine | Required header |
---|---|
toascii , __toascii |
C: <ctype.h> C++: <cctype> or <ctype.h> |
The toascii
macro is a POSIX extension, and __toascii
is a Microsoft-specific implementation of the POSIX extension. For more compatibility information, see Compatibility.