toupper
Konwertuje znak na wielkie litery.
template<Class CharType>
CharType toupper(
CharType _Ch,
const locale& _Loc
)
Parametry
_Ch
Znak są konwertowane na wielkie litery._Loc
Ustawienia regionalne, zawierającą znak do konwersji.
Wartość zwracana
Znak jest konwertowany na wielkie litery.
Uwagi
Funkcja szablonu zwraca use_facet<ctype<CharType>>(_Loc).toupper(_Ch).
Przykład
// locale_toupper.cpp
// compile with: /EHsc
#include <locale>
#include <iostream>
using namespace std;
int main( )
{
locale loc ( "German_Germany" );
char result1 = toupper ( 'h', loc );
cout << "The upper case of 'h' in the locale is: "
<< result1 << "." << endl;
char result2 = toupper ( 'H', loc );
cout << "The upper case of 'H' in the locale is: "
<< result2 << "." << endl;
char result3 = toupper ( '$', loc );
cout << "The upper case of '$' in the locale is: "
<< result3 << "." << endl;
}
Dane wyjściowe
The upper case of 'h' in the locale is: H.
The upper case of 'H' in the locale is: H.
The upper case of '$' in the locale is: $.
Wymagania
Nagłówek:<ustawień regionalnych>
Przestrzeń nazw: std