std::islower(std::locale) - cppreference.com
提供: cppreference.com
<tbody> </tbody>
|
|
||
指定された文字が指定されたロケールの std::ctype ファセットによってアルファベットの小文字として分類されるかどうか調べます。
引数
戻り値
文字が小文字として分類される場合は true、そうでなければ false を返します。
実装例
template< class charT > bool islower( charT ch, const std::locale& loc ) { return std::use_facet<std::ctype<charT>>(loc).is(std::ctype_base::lower, ch); }
例
異なるロケールで islower() の使用をデモンストレーションします (OS 固有)。
#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'; }
出力例:
islower('π', C locale) returned false
islower('π', Unicode locale) returned true