On this page
  1. tolower
  2. Include
  3. Signature & Overview
  4. Notes & Pitfalls
  5. Example

tolower

Prev: isspace | Up: ctype.h | Next: errno.h
Rel: ctype.h, Arrays & C Strings
Ref: cppreference — tolower
Tags: #public #prog #c #stdlib #ctype #tier/core


Include

#include <ctype.h>

Signature & Overview

int tolower(int ch);  /* also toupper */

Converts an uppercase character to lowercase.

Notes & Pitfalls

Example

#include <assert.h>
#include <ctype.h>

int main(void) {
    assert(tolower((unsigned char)'A') == 'a');
    assert(tolower((unsigned char)'!') == '!');
}

Linked from

Related notes