std::upperc...:nouppercase(3)

πŸ“¦ version 2024.07.05, in nixpkgs unstable, opensuse-leap 16.0

✨ NAME ✨

std::uppercase, std::nouppercase β€” okay so this page is std::upperc...:nouppercase(3) from the C++ Standard Libary manual, and the NAME is literally std::uppercase,std::nouppercase β€” std::uppercase,std::nouppercase. πŸ’…

🌸 Synopsis 🌸

These two live in header <ios>, and the signatures are giving exactly this:

Defined in header <ios>
std::ios_base& uppercase( std::ios_base& str );   (1)
std::ios_base& nouppercase( std::ios_base& str ); (2)

πŸŽ€ Parameters πŸŽ€

  • str β€” reference to I/O stream. 🫢

πŸ’– Return value πŸ’–

str (reference to the stream after manipulation). It's giving the same stream back, okay? πŸ’–

🧚 Example 🧚

Okay bestie, run this code β€” it's iconic:

       // Run this code

        #include <iostream>

        int main()
        {
            std::cout << std::hex << std::showbase
                      << "0x2a with uppercase: " << std::uppercase << 0x2a <<
       '\n'
                      << "0x2a with nouppercase: " << std::nouppercase << 0x2a
       << '\n'
                      << "1e-10 with uppercase: " << std::uppercase << 1e-10 <<
       '\n'
                      << "1e-10 with nouppercase: " << std::nouppercase <<
       1e-10 << '\n';
        }

πŸ“ Output πŸ“

And the output is literally:

0x2a with uppercase: 0X2A
0x2a with nouppercase: 0x2a
1e-10 with uppercase: 1E-10
1e-10 with nouppercase: 1e-10

πŸ”₯ See also πŸ”₯

  • resetiosflags β€” clears the specified ios_base flags (function). 🧚
  • setiosflags β€” sets the specified ios_base flags (function). πŸ”₯
πŸ’– source/version check: this came from http://cppreference.com, dated 2024.06.10. That's the footer, bestie β€” we ate, no cap. πŸ‘‘
πŸ“¦ where this page comes from