Embedded Artistry libc
C Standard Library Support for Bare-metal Systems
toascii.c File Reference
#include <ctype.h>
Include dependency graph for toascii.c:

Go to the source code of this file.

Functions

int toascii (int c)
 Converts the given character to ASCII. More...
 

Function Documentation

◆ toascii()

int toascii ( int  ch)

Converts the given character to ASCII.

Converts the given character to a 7-bit unsigned char value that fits into the ASCII character set.

Parameters
chcharacter to be converted.
Returns
The value returned is that of the converted letter, or ch if the conversion was not possible.

Definition at line 5 of file toascii.c.

6 {
7  return c & 0x7f;
8 }