toascii
Go Up to ctype.h Index
Header File
ctype.h
Category
Conversion Routines
Prototype
int toascii(int c);
Description
Translates characters to ASCII format.
toascii is a macro that converts the integer c to ASCII by clearing all but the lower 7 bits; this gives a value in the range 0 to 127.
Return Value
toascii returns the converted value of c.
Example
#include <ctype.h>
char* asciify(char* input)
{
while (*input)
{
*input = toascii(*input);
input++;
}
return input;
}
Portability
| POSIX | Win32 | ANSI C | ANSI C++ |
|---|---|---|---|
|
+ |