首页
学习
活动
专区
工具
TVP
发布
精选内容/技术社群/优惠产品,尽在小程序
立即前往

std::islower(std::locale)

Defined in header <locale>

?

?

template< class charT > bool islower( charT ch, const locale& loc );

?

?

检查给定字符是否按照给定的区域设置%27s归类为小写字母字符std::ctype小面。

参数

ch

-

character

loc

-

locale

返回值

回报true如果字符被归类为小写,false否则。

可能的实施

模板<class图表>bool是更低的%28图表ch,Const std::locale&loc%29{返回std::use[医]facet<std::Ctype<charT>>%28 loc%29 is%28 std::Ctype[医]碱基:较低,ch%29;}

*。

演示在不同地区使用islow%28%29的用法--特定于%28 OS的%29。

二次

代码语言:javascript
复制
#include <iostream>
#include <locale>
int main()
{
    const wchar_t c = L'\u03c0'; // greek small letter pi
 
    std::locale loc1("C");
    std::cout << "islower('π?', C locale) returned "
               << std::boolalpha << std::islower(c, loc1) << '\n';
 
    std::locale loc2("en_US.UTF8");
    std::cout << "islower('π?', Unicode locale) returned "
              << std::boolalpha << std::islower(c, loc2) << '\n';
}

二次

产出:

二次

代码语言:javascript
复制
islower('π?', C locale) returned false
islower('π?', Unicode locale) returned true

二次

另见

islower

checks if a character is lowercase (function)

iswlower

checks if a wide character is lowercase (function)

代码语言:txt
复制
 ? cppreference.com

在CreativeCommonsAttribution下授权-ShareAlike未移植许可v3.0。

扫码关注腾讯云开发者

领取腾讯云代金券

http://www.vxiaotou.com