📅  最后修改于: 2020-09-25 10:30:10             🧑  作者: Mango
iswspace() 函数在
int iswspace(wint_t ch);
iswspace() 函数检查ch
是否为空格字符 。默认情况下,以下字符是空格字符:
#include
#include
#include
#include
using namespace std;
int main()
{
setlocale(LC_ALL, "en_US.UTF-8");
wchar_t str[] = L"\n\n\t\u0939\u0947\u0932\u094b \n\n";
wcout << L"Before removing whitespace characters" << endl;
wcout << str << endl << endl;
wcout << L"After removing whitespace characters" << endl;
for (int i=0; i
运行该程序时,输出为:
Before removing whitespace characters
हेलो
After removing whitespace characters
हेलो