c-strtof, c-strtod, c-strtold: Make multithread-safe.
[gnulib.git] / doc / c-ctype.texi
blobec8d716c8c9188a9a49923f02c397f811020b89c
1 @c Documentation of gnulib module 'c-ctype'.
3 @c Copyright (C) 2008--2024 Free Software Foundation, Inc.
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, no Front-Cover Texts, and no Back-Cover Texts.  A
9 @c copy of the license is at <https://www.gnu.org/licenses/fdl-1.3.en.html>.
11 The @code{c-ctype} module contains functions operating on single-byte
12 characters, like the functions in @code{<ctype.h>}, that operate as if the
13 locale encoding was ASCII@.  (The "C" locale on many systems has the locale
14 encoding "ASCII".)
16 The functions are:
17 @smallexample
18 extern bool c_isascii (int c);
20 extern bool c_isalnum (int c);
21 extern bool c_isalpha (int c);
22 extern bool c_isblank (int c);
23 extern bool c_iscntrl (int c);
24 extern bool c_isdigit (int c);
25 extern bool c_islower (int c);
26 extern bool c_isgraph (int c);
27 extern bool c_isprint (int c);
28 extern bool c_ispunct (int c);
29 extern bool c_isspace (int c);
30 extern bool c_isupper (int c);
31 extern bool c_isxdigit (int c);
33 extern int c_tolower (int c);
34 extern int c_toupper (int c);
35 @end smallexample
37 These functions assign properties only to ASCII characters.
39 The @var{c} argument can be a @code{char} or @code{unsigned char} value,
40 whereas the corresponding functions in @code{<ctype.h>} take an argument
41 that is actually an @code{unsigned char} value.
43 The @code{c_is*} functions return @samp{bool}, where the corresponding
44 functions in @code{<ctype.h>} return @samp{int} for historical reasons.
46 Note: The @code{<ctype.h>} functions support only unibyte locales.