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

Go to the source code of this file.

Functions

int tolower (int c)
 Converts the given character to lowercase. More...
 

Function Documentation

◆ tolower()

int tolower ( int  ch)

Converts the given character to lowercase.

Converts the given character to lowercase according to the character conversion rules defined by the default local, i.e. the following uppercase letters (ABCDEFGHIJKLMNOPQRSTUVWXYZ) are replaced with respective lowercase letters (abcdefghijklmnopqrstuvwxyz).

The behavior is undefined if the value of ch is not representable as unsigned char and is not equal to EOF.

Parameters
chcharacter to be converted.
Returns
Lowercase version of ch or unmodified ch if no lowercase version is listed in the default locale.

Definition at line 5 of file tolower.c.

6 {
7  if(isupper(c))
8  {
9  {
10  return c | 32;
11  }
12  }
13  return c;
14 }
int isupper(int ch)
Checks if the given character is an uppercase character.
Definition: isupper.c:5

References isupper().

Referenced by towlower().

Here is the caller graph for this function: