tolower
將字元轉換為小寫。
template<Class CharType>
CharType tolower(
CharType _Ch,
const locale& _Loc
)
參數
_Ch
要轉換的字元轉換為小寫。_Loc
包含的地區設定要轉換的。
傳回值
字元轉換成小寫。
備註
樣板函式傳回 use_facet<ctype<CharType> > (_Loc)。tolower(_Ch)。
範例
// locale_tolower.cpp
// compile with: /EHsc
#include <locale>
#include <iostream>
using namespace std;
int main( )
{
locale loc ( "German_Germany" );
char result1 = tolower ( 'H', loc );
cout << "The lower case of 'H' in the locale is: "
<< result1 << "." << endl;
char result2 = tolower ( 'h', loc );
cout << "The lower case of 'h' in the locale is: "
<< result2 << "." << endl;
char result3 = tolower ( '$', loc );
cout << "The lower case of '$' in the locale is: "
<< result3 << "." << endl;
}
Output
The lower case of 'H' in the locale is: h.
The lower case of 'h' in the locale is: h.
The lower case of '$' in the locale is: $.
需求
標題: <locale>
命名空間: std