std::uppercase, std::nouppercase

Header: <ios>

Enables the use of uppercase characters in floating-point and hexadecimal integer output. Has no effect on input.

# Declarations

std::ios_base& uppercase( std::ios_base& str );
std::ios_base& nouppercase( std::ios_base& str );

# Parameters

# Return value

str (reference to the stream after manipulation).

# Example

#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';
}

# See also