std:: islower (std::locale)
From cppreference.net
C++
Text processing library
| Localization library | |||||||||||||||||||||||||
| Regular expressions library (C++11) | |||||||||||||||||||||||||
| Formatting library (C++20) | |||||||||||||||||||||||||
| Null-terminated sequence utilities | |||||||||||||||||||||||||
| Byte strings | |||||||||||||||||||||||||
| Multibyte strings | |||||||||||||||||||||||||
| Wide strings | |||||||||||||||||||||||||
| Primitive numeric conversions | |||||||||||||||||||||||||
|
|||||||||||||||||||||||||
| Text encoding identifications | |||||||||||||||||||||||||
|
|||||||||||||||||||||||||
Localization library
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
헤더 파일에 정의됨
<locale>
|
||
|
template
<
class
CharT
>
bool islower ( CharT ch, const locale & loc ) ; |
||
주어진 문자가 주어진 로캘의 std::ctype 패싯에 의해 소문자 알파벳 문자로 분류되는지 확인합니다.
목차 |
매개변수
| ch | - | 문자 |
| loc | - | 로케일 |
반환값
해당 문자가 소문자로 분류되면 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); } |
예제
다양한 로케일(OS별)에서
islower()
사용법을 보여줍니다.
이 코드 실행
#include <iostream> #include <locale> int main() { const wchar_t c = L'\u03c0'; // GREEK SMALL LETTER PI std::locale loc1("C"); std::cout << std::boolalpha << "islower('π', C locale) returned " << std::islower(c, loc1) << '\n' << "isupper('π', C locale) returned " << std::isupper(c, loc1) << '\n'; std::locale loc2("en_US.UTF8"); std::cout << "islower('π', Unicode locale) returned " << std::islower(c, loc2) << '\n' << "isupper('π', Unicode locale) returned " << std::isupper(c, loc2) << '\n'; }
가능한 출력:
islower('π', C locale) returned false
isupper('π', C locale) returned false
islower('π', Unicode locale) returned true
isupper('π', Unicode locale) returned false
참고 항목
|
문자가 소문자인지 확인합니다
(함수) |
|
|
와이드 문자가 소문자인지 확인합니다
(함수) |