ctype.h(3)
πΈ ctype.h β bestie edition π
okay so. this is <ctype.h> from avr-libc (that's the manual, section 3, and yes we're doing this together, hold my iced coffee π§).
β¨ NAME β¨
ctype.h β the header that's literally just out here classifying your characters and converting them, no cap π
β¨ SYNOPSIS β¨
π Functions π
π Character classification routines π
okay so these functions do character classification, periodt. they hand you back a true-or-false status depending on whether the character you passed in falls into that function's classification β like, isdigit() returns true if its argument is any value '0' through '9', inclusive. that's it, that's the whole vibe.
π¨ important bestie: if the input is not an unsigned char value, then all of these functions return false. not "maybe", not "undefined", just false. remember that. π«Ά
int isalnum (int __c)
int isalpha (int __c)
int isascii (int __c)
int isblank (int __c)
int iscntrl (int __c)
int isdigit (int __c)
int isgraph (int __c)
int islower (int __c)
int isprint (int __c)
int ispunct (int __c)
int isspace (int __c)
int isupper (int __c)
int isxdigit (int __c)
so like, one by one, here's the whole roster π
int isalnum (int __c)β is it a letter or a number? iconic either way πint isalpha (int __c)β is it a letter? alphabet girlie check β¨int isascii (int __c)β is it in the ASCII club? πint isblank (int __c)β is it a blank character? soft launch energy πΈint iscntrl (int __c)β is it a control character? the unhinged ones πint isdigit (int __c)β is it a digit?'0'through'9', inclusive, no cap π’int isgraph (int __c)β is it a graphical character? main character energy πint islower (int __c)β is it lowercase? soft-spoken queen πint isprint (int __c)β is it printable? it's giving visible πint ispunct (int __c)β is it punctuation? the drama of it all πint isspace (int __c)β is it whitespace? personal space, respected π¦int isupper (int __c)β is it uppercase? LOUD and proud π₯int isxdigit (int __c)β is it a hex digit? nerd-coded and we love that β
π§ Character convertion routines π§
this realization permits all possible values of the integer argument, fr fr. here's the tea:
toascii()clears all highest bits π§Ήtolower()andtoupper()return an input argument as is if it is not anunsigned charvalue π
int toascii (int __c)
int tolower (int __c)
int toupper (int __c)
so the lineup π«
int toascii (int __c)β clears all the highest bits, spring cleaning for your int β¨int tolower (int __c)β drops it to lowercase, but if it's not anunsigned charvalue it just returns your input as is, no notes πint toupper (int __c)β yells it into uppercase, and same deal: not anunsigned charvalue? returns the input as is π
β¨ Author β¨
Generated automatically by Doxygen for avr-libc from the source code. (not a human, just a little robot doing its thing π€π)
k that's the whole page bestie, go forth and classify some characters π β¨
Version 2.1.0 β Sat Jan 29 2022 π mwah, love u, bye π«ΆπΈ
π¦ where this page comes from
- fedora 43: avr-libc 2.2.1-3.fc43 Β· BSD-3-Clause
- fedora 44: avr-libc 2.2.1-5.fc44 Β· BSD-3-Clause
- opensuse-leap 16.0: avr-libc 2.1.0-bp160.1.33 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms