Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

ctype(3) [v7 man page]

CTYPE(3)						     Library Functions Manual							  CTYPE(3)

NAME
isalpha, isupper, islower, isdigit, isalnum, isspace, ispunct, isprint, iscntrl, isascii - character classification SYNOPSIS
#include <ctype.h> isalpha(c) . . . DESCRIPTION
These macros classify ASCII-coded integer values by table lookup. Each is a predicate returning nonzero for true, zero for false. Isascii is defined on all integer values; the rest are defined only where isascii is true and on the single non-ASCII value EOF (see stdio(3)). isalpha c is a letter isupper c is an upper case letter islower c is a lower case letter isdigit c is a digit isalnum c is an alphanumeric character isspace c is a space, tab, carriage return, newline, or formfeed ispunct c is a punctuation character (neither control nor alphanumeric) isprint c is a printing character, code 040(8) (space) through 0176 (tilde) iscntrl c is a delete character (0177) or ordinary control character (less than 040). isascii c is an ASCII character, code less than 0200 SEE ALSO
ascii(7) CTYPE(3)

Check Out this Related Man Page

CTYPE(3)						     Library Functions Manual							  CTYPE(3)

NAME
isalpha, isupper, islower, isdigit, isxdigit, isalnum, isspace, ispunct, isprint, isgraph, iscntrl, isascii, toupper, tolower, toascii - character classification macros SYNOPSIS
#include <ctype.h> isalpha(c) . . . DESCRIPTION
These macros classify ASCII-coded integer values by table lookup. Each is a predicate returning nonzero for true, zero for false. Isascii and toascii are defined on all integer values; the rest are defined only where isascii is true and on the single non-ASCII value EOF (see stdio(3S)). isalpha c is a letter isupper c is an upper case letter islower c is a lower case letter isdigit c is a digit isxdigit c is a hex digit isalnum c is an alphanumeric character isspace c is a space, tab, carriage return, newline, vertical tab, or formfeed ispunct c is a punctuation character (neither control nor alphanumeric) isprint c is a printing character, code 040(8) (space) through 0176 (tilde) isgraph c is a printing character, similar to isprint except false for space. iscntrl c is a delete character(0177) or ordinary control character (less than 040). isascii c is an ASCII character, code less than 0200 tolower c is converted to lower case. Return value is undefined if not isupper(c). toupper c is converted to upper case. Return value is undefined if not islower(c). toascii c is converted to be a valid ascii character. SEE ALSO
ascii(7) 7th Edition May 12, 1986 CTYPE(3)
Man Page

4 More Discussions You Might Find Interesting

1. Programming

undefined reference to `__ctype_b'

when i compile my program, i meet the following error: ... undefined reference to `__ctype_b' ... anybody knows which shared library should be linked during make? thanks a lot! (6 Replies)
Discussion started by: princelinux
6 Replies

2. Programming

How will the behaviour of multibyte char differ because of different LC_CTYPE locale?

I am comparing two multibyte characters in two different platforms having different LC_CTYPE variables, they are returning different values. One of the variable is sigma initialised to "\317\203" and the other one is empty string i.e, "" Below is the scenario of the two platforms: In... (4 Replies)
Discussion started by: baig_1988
4 Replies

3. Homework & Coursework Questions

Function to Check if string input from user is alphabetic only

Good Evening. I'm new to C. Can you please help me. I'm creating an error checking function, user will input a string, this will check if the input is all alphabet or all letters only. If there is a digit or other special char, it will print Error then ask input from user again. Here's my... (1 Reply)
Discussion started by: eracav
1 Replies

4. Shell Programming and Scripting

User switching without carrying over LC_CTYPE env variable

I am using Solaris8, userA's shell '/usr/ace/prog/sdshell', AppuserB's shell '/bin/ksh'. serverT:/home/userA>LC_CTYPE=iso_8859_1; export LC_CTYPE; vtemp='userA variable'; export vtemp serverT:/home/userA>echo "LC_CTYPE=$LC_CTYPE, vtemp=$vtemp"; LC_CTYPE=iso_8859_1, vtemp=userA... (4 Replies)
Discussion started by: kchinnam
4 Replies