📅  最后修改于: 2020-09-25 10:30:48             🧑  作者: Mango
iswupper() 函数在
int iswupper(wint_t ch);
iswupper() 函数检查ch是否为大写字符,即以下之一:
A,B,C,D,E,F,G,H,I,J,K,L,M,N,O,P,Q,R,S,T,U,V,W,X,Y,Z.
#include
#include
#include
using namespace std;
int main()
{
setlocale(LC_ALL, "en_US.UTF-8");
wchar_t ch1 = L'\u03a0';
wchar_t ch2 = L'\u03c0';
wcout << L"iswupper(" << ch1 << ") returned " << boolalpha << (bool)iswupper(ch1) << endl;
wcout << L"iswupper(" << ch2 << ") returned " << boolalpha << (bool)iswupper(ch2) << endl;
return 0;
}
运行该程序时,输出为:
iswupper(Π) returned true
iswupper(π) returned false