Chapter Contents

Previous

Next
islower

islower



Lowercase Alphabetic Character Test

Portability: ISO/ANSI C conforming, UNIX compatible


SYNOPSIS
DESCRIPTION
RETURN VALUE
CAUTION
EXAMPLE
RELATED FUNCTIONS
SEE ALSO


SYNOPSIS

#include <ctype.h>

int islower(int c);


DESCRIPTION

islower tests an integer value c to determine whether it is a lowercase alphabetic character.


RETURN VALUE

islower returns 0 if the character is not a lowercase alphabetic character, or a nonzero value if it is. If the argument is EOF , 0 is returned.


CAUTION

The effect of islower on a noncharacter argument other than EOF is undefined. The definition of a lowercase character is locale dependent. Do not assume that islower returns either 0 or 1.


EXAMPLE

#include <ctype.h>
#include <stdio.h>

void main()
{
   char id[21];
   char *text;
   int i;

   text = "passwordTESTING";

      /* Copy uppercase "identifier" from text to id. */
   for (i = 0; i < 20 && islower(text[i]); ++i)
      id[i] = text[i];
   id[i] = '\0';

      /* Only the word "password" should be copied. */
   puts( id);
}


RELATED FUNCTIONS

isalpha , isupper , tolower , toupper


SEE ALSO


Chapter Contents

Previous

Next

Top of Page

Copyright © 2001 by SAS Institute Inc., Cary, NC, USA. All rights reserved.