ctype.h(3)

πŸ“¦ version 2.2.1, in fedora 43, fedora 44, opensuse-leap 16.0

🌸 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() and toupper() return an input argument as is if it is not an unsigned char value πŸ™ˆ
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 an unsigned char value it just returns your input as is, no notes πŸ“
  • int toupper (int __c) β€” yells it into uppercase, and same deal: not an unsigned char value? 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