TOUPPER(3P)
π TOUPPER(3P) π
okay bestie, gather round, because this one is a POSIX Programmer's Manual page for toupper β yes, the little function that makes your lowercase letters β¨shoutβ¨ β and we are going to read it together like the icons we are.
πΈ PROLOG πΈ
Real talk first: this manual page is part of the POSIX Programmer's Manual. The Linux implementation of this interface may differ (so bestie, consult the corresponding Linux manual page for details of Linux behavior), or the interface may not be implemented on Linux at all. π Not every vibe ships everywhere, iykyk.
π NAME π
toupper, toupper_l β transliterate lowercase characters to uppercase
it's giving glow-up, but for letters. π
β¨ SYNOPSIS β¨
#include <ctype.h>
int toupper(int c);
int toupper_l(int c, locale_t locale);
two sisters, one include, no cap.
π DESCRIPTION π
Okay so, for toupper(): the functionality described on this reference page is aligned with the ISO C standard. Any conflict between the requirements described here and the ISO C standard is unintentional. This volume of POSIX.1β2017 defers to the ISO C standard. she's polite like that, she lets ISO take the mic. π€
The toupper() and toupper_l() functions have as a domain a type int, the value of which is representable as an unsigned char or the value of EOF.
π¨ bestie this is the part where you listen: if the argument has any other value, the behavior is undefined. not "kinda weird", not "probably fine" β undefined. do not play with her. π
If the argument of toupper() or toupper_l() represents a lowercase letter, and there exists a corresponding uppercase letter as defined by character type information in the current locale β or in the locale represented by locale, respectively β (category LC_CTYPE), the result shall be the corresponding uppercase letter. matching outfits, but make it uppercase. π
All other arguments in the domain are returned unchanged. no notes, she just hands it right back to you. π«Ά
And one more warning because we care about you: the behavior is undefined if the locale argument to toupper_l() is the special locale object LC_GLOBAL_LOCALE, or if it is not a valid locale object handle. β οΈ literally do not.
π RETURN VALUE π
Upon successful completion, toupper() and toupper_l() shall return the uppercase letter corresponding to the argument passed; otherwise, they shall return the argument unchanged. either she glows you up or she leaves you exactly as you are β both are valid. β¨
π ERRORS π
No errors are defined.
iconic behavior honestly. nothing to report, no drama, no errno chaos. π
The following sections are informative. (translation: cute to know, not binding. the vibe is lore, not law.)
π¦ EXAMPLES π¦
None.
not a single example, and yet she ate. the confidence. π
π APPLICATION USAGE π
None.
nothing to add, she said what she said. π
πΈ RATIONALE πΈ
None.
no justification needed when you're this correct. π
β FUTURE DIRECTIONS β
None.
she's not going anywhere, bestie. she's eternal. β¨
π₯ SEE ALSO π₯
setlocale()uselocale()
Also, from the Base Definitions volume of POSIX.1β2017: Chapter 7, Locale, <ctype.h>, <locale.h>. π go read those, they're the supporting cast and they also serve.
π COPYRIGHT π
okay legal besties, here's the receipts, keeping it exactly as written because lawyers do not appreciate a remix:
Portions of this text are reprinted and reproduced in electronic form from IEEE Std 1003.1-2017, Standard for Information Technology -- Portable Operating System Interface (POSIX), The Open Group Base Specifications Issue 7, 2018 Edition, Copyright (C) 2018 by the Institute of Electrical and Electronics Engineers, Inc and The Open Group. In the event of any discrepancy between this version and the original IEEE and The Open Group Standard, the original IEEE and The Open Group Standard is the referee document. The original Standard can be obtained online at http://www.opengroup.org/unix/online.html .
Any typographical or formatting errors that appear in this page are most likely to have been introduced during the conversion of the source files to man page format. To report such errors, see https://www.kernel.org/doc/man-pages/reporting_bugs.html .
and that's the whole page, bestie. this one came from IEEE/The Open Group, dated 2017, and it's the TOUPPER(3P) page from the POSIX Programmer's Manual. lowercase in, uppercase out, undefined behavior if you get weird with it. slay responsibly. πβ¨ππ¦
π¦ where this page comes from
- alpine 3.22: man-pages-posix 2017a-r0 Β· custom
- alpine 3.23: man-pages-posix 2017a-r0 Β· custom
- alpine 3.24: man-pages-posix 2017a-r0 Β· custom
- arch rolling: man-pages 6.19-1
- arch rolling: man-pages 6.20-1 Β· BSD-2-Clause AND BSD-3-Clause AND BSD-4.3TAHOE AND BSD-4-Clause-UC AND GPL-1.0-or-later AND GPL-2.0-only AND GPL-2.0-or-later AND GPL-3.0-or-later AND LGPL-3.0-linking-exception AND LGPL-3.0-or-later AND LicenseRef-Public-Domain AND LicenseRef-UltraPermissive AND Linux-man-pages-1-para AND Linux-man-pages-copyleft AND Linux-man-pages-copyleft-2-para AND Linux-man-pages-copyleft-var AND MIT AND Spencer-94
- nixpkgs unstable: man-pages-posix 2017a
- opensuse-leap 16.0: man-pages-posix 2017a-160000.4.1 Β· SUSE-IEEE
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms