maint: update copyright
[gnulib.git] / doc / c-ctype.texi
1 @c Documentation of gnulib module 'c-ctype'.
2
3 @c Copyright (C) 2008-2014 Free Software Foundation, Inc.
4
5 @c Permission is granted to copy, distribute and/or modify this document
6 @c under the terms of the GNU Free Documentation License, Version 1.3 or
7 @c any later version published by the Free Software Foundation; with no
8 @c Invariant Sections, with no Front-Cover Texts, and with no Back-Cover
9 @c Texts.  A copy of the license is included in the ``GNU Free
10 @c Documentation License'' file as part of this distribution.
11
12 The @code{c-ctype} module contains functions operating on single-byte
13 characters, like the functions in @code{<ctype.h>}, that operate as if the
14 locale encoding was ASCII.  (The "C" locale on many systems has the locale
15 encoding "ASCII".)
16
17 The functions are:
18 @smallexample
19 extern bool c_isascii (int c);
20
21 extern bool c_isalnum (int c);
22 extern bool c_isalpha (int c);
23 extern bool c_isblank (int c);
24 extern bool c_iscntrl (int c);
25 extern bool c_isdigit (int c);
26 extern bool c_islower (int c);
27 extern bool c_isgraph (int c);
28 extern bool c_isprint (int c);
29 extern bool c_ispunct (int c);
30 extern bool c_isspace (int c);
31 extern bool c_isupper (int c);
32 extern bool c_isxdigit (int c);
33
34 extern int c_tolower (int c);
35 extern int c_toupper (int c);
36 @end smallexample
37
38 These functions assign properties only to ASCII characters.
39
40 The @var{c} argument can be a @code{char} or @code{unsigned char} value,
41 whereas the corresponding functions in @code{<ctype.h>} take an argument
42 that is actually an @code{unsigned char} value.
43
44 The @code{c_is*} functions return @samp{bool}, where the corresponding
45 functions in @code{<ctype.h>} return @samp{int} for historical reasons.
46
47 Note: The @code{<ctype.h>} functions support only unibyte locales.