Skip to content

Latest commit

 

History

History
53 lines (38 loc) · 1.96 KB

toascii-toascii.md

File metadata and controls

53 lines (38 loc) · 1.96 KB
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
__toascii
msvcrt.dll
msvcr80.dll
msvcr90.dll
msvcr100.dll
msvcr100_clr0400.dll
msvcr110.dll
msvcr110_clr0400.dll
msvcr120.dll
msvcr120_clr0400.dll
ucrtbase.dll
api-ms-win-crt-convert-l1-1-0.dll
DLLExport
apiref
CTYPE/toascii
CTYPE/__toascii
__toascii
toascii
toascii function
string conversion, to ASCII characters
__toascii function
ASCII characters, converting to
a07c0608-b0e2-4da2-a20c-7b64d6a9b77c

toascii, __toascii

Converts characters to 7-bit ASCII by truncation.

Syntax

int __toascii(
   int c
);
#define toascii __toascii

Parameters

c
Character to convert.

Return value

__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.

Remarks

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.

Requirements

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.

See also

Data conversion
is, isw routines
to functions