网站开发php js,子商务网站建设的一般流程图,网页制作需要学多久,百度收录网站但首页快照不更新本地化库
本地环境设施包含字符分类和字符串校对、数值、货币及日期/时间格式化和分析#xff0c;以及消息取得的国际化支持。本地环境设置控制流 I/O 、正则表达式库和 C 标准库的其他组件的行为。 检查字符是否被本地环境分类为小写
std::islower(std::locale) template以及消息取得的国际化支持。本地环境设置控制流 I/O 、正则表达式库和 C 标准库的其他组件的行为。 检查字符是否被本地环境分类为小写
std::islower(std::locale) template class charT bool islower( charT ch, const locale loc );
检查给定字符是否为给定 locale 的 std::ctype 平面分类为小写字母字符。
参数
ch-字符loc-本地环境
返回值
若给定字符被分类为小写则返回 true 否则返回 false 。 可能的实现
template class charT
bool islower( charT ch, const std::locale loc ) {return std::use_facetstd::ctypecharT(loc).is(std::ctype_base::lower, ch);
} 调用示例
#include iostream
#include localevoid try_with(wchar_t c, const char* locale)
{//检查给定字符是否为给定 locale 的 std::ctype 平面分类为大写字母字符。std::cout islower( c , locale(\ locale \)) returned std::boolalpha std::islower(c, std::locale(locale)) std::endl;
}int main()
{//检查给定的字符在当前的 C 本地环境中是否是空白字符。//空格 (0x20, )//换页(0x0c, \f)//换行(0x0a, \n)//回车(0x0d, \r)//水平制表符(0x09, \t)//垂直制表符(0x0b, \v)std::cout std::boolalpha;std::locale locale1; // locale1 是经典 C 本地环境的副本std::cout locale1.name(): locale1.name() std::endl;std::locale locale2(Chinese (Simplified)_China.936); // locale2 为本地环境std::cout locale2.name(): locale2.name() std::endl;const wchar_t islowerC L\u03c0; // 希腊文小写字母 pitry_with(islowerC, locale1.name().c_str());try_with(islowerC, locale2.name().c_str());std::cout std::endl;const wchar_t islowerC2 A; // ASCII Atry_with(islowerC2, locale1.name().c_str());try_with(islowerC2, locale2.name().c_str());std::cout std::endl;const wchar_t islowerC3 a; // ASCII Atry_with(islowerC3, locale1.name().c_str());try_with(islowerC3, locale2.name().c_str());return 0;
}输出
locale1.name(): C
locale2.name(): Chinese (Simplified)_China.936
islower(960, locale(C)) returned true
islower(960, locale(Chinese (Simplified)_China.936)) returned trueislower(65, locale(C)) returned false
islower(65, locale(Chinese (Simplified)_China.936)) returned falseislower(97, locale(C)) returned true
islower(97, locale(Chinese (Simplified)_China.936)) returned true