TOUPPER(3POSIX)
๐ TOUPPER(3POSIX) โ the POSIX Programmer's Manual glow-up ๐
okay bestie, welcome to toupper(3POSIX), the POSIX Programmer's Manual page for everyone's fave lowercase-to-uppercase glow-up service. pull up a chair, grab a strawberry ๐, and let's get into it.
๐ธ PROLOG ๐ธ
so, real talk first: this manual page is part of the POSIX Programmer's Manual. the Linux implementation of this interface may differ (so like, go check the corresponding Linux manual page for the deets on Linux behavior), or โ and this is the tragic part โ the interface may not even be implemented on Linux at all. ๐
โจ NAME โจ
toupper, toupper_l โ transliterate lowercase characters to uppercase
no cap, that's the whole job. lowercase in, uppercase out. it's giving elevator pitch. ๐
๐ฆ SYNOPSIS ๐ฆ
#include <ctype.h>
int toupper(int c);
int toupper_l(int c, locale_t locale);
๐ DESCRIPTION ๐
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 โ not me causing drama with the standards bodies, I promise. ๐ this volume of POSIX.1โ2017 defers to the ISO C standard.
the actual vibe:
toupper() and toupper_l() have as a domain a type int, the value of which is representable as an unsigned char or the value of EOF. if the argument has any other value, the behavior is undefined. so like, stay in your lane, bestie. ๐ง
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) โ then the result shall be the corresponding uppercase letter. slay. โจ
all other arguments in the domain are returned unchanged. iconic behavior honestly, it just hands them back to you. ๐ซถ
โ ๏ธ the behavior is undefined if the locale argument totoupper_l()is the special locale objectLC_GLOBAL_LOCALEor is not a valid locale object handle. do not do this. do not pass go. do not collect $200. ๐ญ
โญ 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. that's it, that's the whole personality. ๐
๐ ERRORS ๐
no errors are defined. zero. none. the girlies are unbothered. ๐ โโ๏ธ
the following sections are informative.
๐ EXAMPLES ๐
none. (we're keeping it mysterious, iykyk.) ๐ง
๐ APPLICATION USAGE ๐
none. โจ
๐ง RATIONALE ๐ง
none. ๐
๐ฎ FUTURE DIRECTIONS ๐ฎ
none. the future is bright and also empty here. โญ
๐ SEE ALSO ๐
setlocale()uselocale()- the Base Definitions volume of POSIX.1โ2017, Chapter 7, Locale,
<ctype.h>,<locale.h>
๐ COPYRIGHT ๐
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 absolute queen of a manpage was brought to you by IEEE/The Open Group, dated 2017, filed under TOUPPER(3POSIX). mwah, stay uppercase. ๐โจ๐
๐ฆ where this page comes from
- debian bookworm: manpages-posix-dev 2017a-2 ยท Other
- debian trixie: manpages-posix-dev 2017a-2 ยท Other
- ubuntu jammy: manpages-posix-dev 2017a-2 ยท Other
- ubuntu noble: manpages-posix-dev 2017a-2 ยท Other
- ubuntu resolute: manpages-posix-dev 2017a-2build1 ยท Other
- ubuntu stonking: manpages-posix-dev 2017a-2.1 ยท Other
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms