www.delorie.com/gnu/docs/glibc/libc_64.html   search  
Buy the book!

The GNU C Library

[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

4. Character Handling

Programs that work with characters and strings often need to classify a character--is it alphabetic, is it a digit, is it whitespace, and so on--and perform case conversion operations on characters. The functions in the header file `ctype.h' are provided for this purpose.

Since the choice of locale and character set can alter the classifications of particular character codes, all of these functions are affected by the current locale. (More precisely, they are affected by the locale currently selected for character classification--the LC_CTYPE category; see 7.3 Categories of Activities that Locales Affect.)

The ISO C standard specifies two different sets of functions. The one set works on char type characters, the other one on wchar_t wide characters (see section 6.1 Introduction to Extended Characters).

4.1 Classification of Characters  Testing whether characters are letters, digits, punctuation, etc.

4.2 Case Conversion  Case mapping, and the like.
4.3 Character class determination for wide characters  
4.4 Notes on using the wide character classes  
4.5 Mapping of wide characters.  

  webmaster     delorie software   privacy  
  Copyright 2003   by The Free Software Foundation     Updated Jun 2003