#include <ctype.h> int islower(int c);
islower
tests an integer value c
to determine whether it is a
lowercase alphabetic character.
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.
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.
#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); }
isalpha
, isupper
, tolower
, toupper
Copyright (c) 1998 SAS Institute Inc. Cary, NC, USA. All rights reserved.