toupper
Преобразование символов в верхний регистр.
template<Class CharType>
CharType toupper(
CharType _Ch,
const locale& _Loc
)
Параметры
_Ch
Символ, который необходимо преобразовать в верхний регистр._Loc
Языковой стандарт, содержащий символ, который необходимо преобразовать.
Возвращаемое значение
Символ, преобразованного в верхний регистр.
Заметки
Функция возвращает > шаблона >CharType<ctype< use_facet(_Loc).toupper(_Ch).
Пример
// 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;
}
Output
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: $.
Требования
заголовок: <locale>
std пространство имен: