xieite ::toupper ()
Defined in header <xieite/data/toupper.hpp>
Converts every character of a string (or a single character) to uppercase.
Only handles the English alphabet.
Declarations
#0Makes a single character uppercase. Internally uses a lookup table.template <xieite ::is_ch Char > [[nodiscard ]]constexpr Char toupper (Char c )noexcept ;
#1
Makes an entire string uppercase. Internally calls #0.template <typename Char ,typename Traits =std ::char_traits <Char >,typename Alloc =std ::allocator <Char >> [[nodiscard ]]constexpr std ::basic_string <Char ,Traits ,Alloc >toupper (std ::basic_string_view <Char ,Traits >strv ,Alloc && alloc = {})noexcept (false );
#2
Defers to #1 after deducingtemplate <typename Char ,typename Traits =std ::char_traits <Char >,typename Alloc =std ::allocator <Char >> [[nodiscard ]]constexpr auto toupper (const std ::basic_string <Char ,Traits ,Alloc >& str ,Alloc && alloc = {})XIEITE_ARROW (xieite ::toupper (xieite ::str_view (str ),XIEITE_FWD (alloc )))
Char
, Traits
, and Alloc
.#3
Defers to #1 after deducingtemplate <xieite ::is_ch Char ,typename Traits =std ::char_traits <Char >,typename Alloc =std ::allocator <Char >,std ::size_t length > [[nodiscard ]]constexpr auto toupper (const xieite ::group <Char [length ]>& str ,Alloc && alloc = {})XIEITE_ARROW (xieite ::toupper (xieite ::str_view <Char ,Traits >(str ),XIEITE_FWD (alloc )))
Char
and possibly Alloc
.Example
Output:int main () {xieite ::dump (xieite ::toupper ("HeLlO, wOrLd!" )); }
[View in Compiler Explorer]HELLO, WORLD!