ctype(3avr)

✨ ctype β€” <ctype.h>: Character Operations ✨

okay bestie, welcome to ctype(3avr) πŸ’– this is the AVR-LibC page for all the little character-vibes functions: the ones that look at a char and go "hmm yes, a digit" or "hmm yes, uppercase" or "let me ✨transform✨ you". It's giving very much <ctype.h> core curriculum and honestly? iconic.


🌸 NAME 🌸

ctype β€” <ctype.h>: Character Operations. That's the whole name, no cap. πŸŽ€


πŸ¦‹ SYNOPSIS πŸ¦‹

πŸ’… Character classification routines

So these functions do character classification, fr fr. They hand back true or false 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. Periodt.

⚠️ But listen: if the input is not an unsigned char value, all of these functions return false. All of them. Every single one. Not me being dramatic, that's just the rules. 😭
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)

✨ Character convertion routines

(they spelled it "convertion" and we are respecting the original's choices 🫢)

This realization permits all possible values of the integer argument β€” yes, all of them, main character energy. The toascii() function clears all the highest bits. And tolower() and toupper()? They return the input argument as-is if it's not an unsigned char value. No notes.

int toascii (int __c)
int tolower (int __c)
int toupper (int __c)

🌈 Detailed Description 🌈

These functions perform various operations on characters. That's the vibe. That's the whole vibe check. πŸ’œ

#include <ctype.h>

πŸ‘‘ Function Documentation πŸ‘‘

πŸ“ int isalnum (int __c) [extern]

Checks for an alphanumeric character. It is equivalent to (isalpha(c) || isdigit(c)). Two for one, we love a combo deal πŸ’–

πŸ“ int isalpha (int __c) [extern]

Checks for an alphabetic character. It is equivalent to (isupper(c) || islower(c)). Literally the same energy as above but for letters only, slay.

πŸ“ int isascii (int __c) [extern]

Checks whether c is a 7-bit unsigned char value that fits into the ASCII character set. Seven bits and thriving. ✨

πŸ“ int isblank (int __c) [extern]

Checks for a blank character β€” that is, a space or a tab. Just those two, no extra guests at this party.

πŸ“ int iscntrl (int __c) [extern]

Checks for a control character. Control issues? ur valid, and so are these characters 😌

πŸ“ int isdigit (int __c) [extern]

Checks for a digit (0 through 9). That's it, that's the function, and it ate. πŸ”₯

πŸ“ int isgraph (int __c) [extern]

Checks for any printable character except space. Space is not invited to this one, sorry bestie πŸ’€

πŸ“ int islower (int __c) [extern]

Checks for a lower-case character. lowercase besties rise up 🫢

πŸ“ int isprint (int __c) [extern]

Checks for any printable character including space. Space IS invited to this one. Different party, different guest list, it's fine. 🌸

πŸ“ int ispunct (int __c) [extern]

Checks for any printable character which is not a space or an alphanumeric character. The punctuation girlies finally get their moment ✨

πŸ“ int isspace (int __c) [extern]

Checks for white-space characters. For the AVR-LibC library, these are:

  • space
  • form-feed ('\f')
  • newline ('\n')
  • carriage return ('\r')
  • horizontal tab ('\t')
  • vertical tab ('\v')

Six whole whitespace icons, periodt. πŸŽ€

πŸ“ int isupper (int __c) [extern]

Checks for an uppercase letter. CAPS LOCK ENERGY, we're obsessed πŸ‘‘

πŸ“ int isxdigit (int __c) [extern]

Checks for a hexadecimal digit β€” i.e. one of 0 1 2 3 4 5 6 7 8 9 a b c d e f A B C D E F. Twenty-two characters living their best hex life 🌈

πŸ“ int toascii (int __c) [extern]

Converts c to a 7-bit unsigned char value that fits into the ASCII character set, by clearing the high-order bits.

⚠️ Warning Many people will be unhappy if you use this function. This function will convert accented letters into random characters. Like, genuinely random. It's giving chaos, not giving conversion. Bestie, be careful. 😭

πŸ“ int tolower (int __c) [extern]

Converts the letter c to lower case, if possible. Soft launch your letters πŸ’…

πŸ“ int toupper (int __c) [extern]

Converts the letter c to upper case, if possible. GLOW UP MODE ACTIVATED πŸ”₯


🧚 Author 🧚

Generated automatically by Doxygen for AVR-LibC from the source code. Not a human, not a bestie, just a doc generator doing its little automated thing 🫢


that's the whole page babes, go forth and classify some characters, ily πŸ’–βœ¨πŸŽ€

AVR-LibC β€” Version 2.2.1 πŸ’« that's the source and version right there, and this page is dated ctype(3avr) β€” shoutout to the ctype(3avr) footer for keeping it real πŸ¦‹πŸŒΈπŸ’œ

πŸ“¦ where this page comes from