Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chrtbl(8)

environ(4)

conv(3)

isxdigit(3)

islower(3)

isupper(3)

isalpha(3)

isalnum(3)

isspace(3)

iscntrl(3)

ispunct(3)

isprint(3)

isgraph(3)

isascii(3)

toupper(3)

toascci(3)

_toupper(3)

setchrclass(3)

stdio(3)



  tolower(3)                          CLIX                          tolower(3)



  NAME

    tolower, _tolower - Returns a lowercase letter

  LIBRARY

    Standard C Library (libc.a)

  SYNOPSIS

    #include <ctype.h>

    int tolower(
      int c );

    int _tolower(
      int c );

  PARAMETERS

    c   An integer representing a character

  DESCRIPTION

    The tolower() macro and the _tolower() function return the corresponding
    lowercase character, if one exists, of a character for which isupper() is
    true.  Otherwise the character is returned unchanged.

    The conversion macro tolower() works the same as the conversion function
    _tolower(), except that the macros do not range check and are therefore
    faster.  Both the conversion macro and function do table lookup.

  EXAMPLES

    To convert each character in a string from upper to lowercase:

    #include <ctype.h>
         .
         .
         .
    int   len,i;
    char  name[10];

    /* copy a string into the variable `name' */
    strcpy(name, "MARY")

    /* find out the length of the string */
    len = strlen(name);

    /* convert each character of the string to lowercase */
    for (i = 0;  i < len; i++)



  2/94 - Intergraph Corporation                                              1






  tolower(3)                          CLIX                          tolower(3)



         name[i] = (char) tolower((int) (name[i]));
    printf("uppercase name is %s \n", name);
         .
         .
         .


  CAUTIONS

    If the argument to any character handling macro is not in the domain of
    the function, the result is undefined.

  RETURN VALUES

    The tolower() macro returns The lowercase version of the input character
    if the input is a uppercase character; otherwise the character is returned
    unchanged.

    The _tolower() function returns the lowercase version of the input
    character if the input is an uppercase character; otherwise the return
    value is undefined.

  RELATED INFORMATION

    Commands:  chrtbl(8)

    Files: environ(4)

    Functions:  conv(3), isxdigit(3), islower(3), isupper(3), isalpha(3),
    isalnum(3), isspace(3), iscntrl(3), ispunct(3), isprint(3), isgraph(3),
    isascii(3), toupper(3), toascci(3), _toupper(3), setchrclass(3), stdio(3)























  2                                              Intergraph Corporation - 2/94




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026