@@ -172,3 +172,58 @@ The following functions provide locale-independent string to number conversions.
172172
173173 Case insensitive comparison of strings. The function works almost
174174 identically to:c:func: `!strncmp ` except that it ignores the case.
175+
176+
177+ Character classification and conversion
178+ =======================================
179+
180+ The following macros provide locale-independent (unlike the C standard library
181+ ``ctype.h ``) character classification and conversion.
182+ The argument must be a signed or unsigned :c:expr:`char`.
183+
184+
185+ .. c:macro:: Py_ISALNUM(c)
186+
187+ Return true if the character *c* is an alphanumeric character.
188+
189+
190+ .. c:macro:: Py_ISALPHA(c)
191+
192+ Return true if the character *c* is an alphabetic character (``a-z `` and ``A-Z ``).
193+
194+
195+ .. c:macro:: Py_ISDIGIT(c)
196+
197+ Return true if the character *c* is a decimal digit (``0-9 ``).
198+
199+
200+ .. c:macro:: Py_ISLOWER(c)
201+
202+ Return true if the character *c* is a lowercase ASCII letter (``a-z ``).
203+
204+
205+ .. c:macro:: Py_ISUPPER(c)
206+
207+ Return true if the character *c* is an uppercase ASCII letter (``A-Z ``).
208+
209+
210+ .. c:macro:: Py_ISSPACE(c)
211+
212+ Return true if the character *c* is a whitespace character (space, tab,
213+ carriage return, newline, vertical tab, or form feed).
214+
215+
216+ .. c:macro:: Py_ISXDIGIT(c)
217+
218+ Return true if the character *c* is a hexadecimal digit (``0-9 ``, ``a-f ``, and
219+ ``A-F ``).
220+
221+
222+ .. c:macro:: Py_TOLOWER(c)
223+
224+ Return the lowercase equivalent of the character *c*.
225+
226+
227+ .. c:macro:: Py_TOUPPER(c)
228+
229+ Return the uppercase equivalent of the character *c*.