std::basic_ios<CharT,Traits>:: narrow
| I/O manipulators | ||||
| Print functions (C++23) | ||||
| C-style I/O | ||||
| Buffers | ||||
|
(C++23)
|
||||
|
(
C++98/26*
)
|
||||
|
(C++20)
|
||||
| Streams | ||||
| Abstractions | ||||
| File I/O | ||||
| String I/O | ||||
| Array I/O | ||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(C++23)
|
||||
|
(
C++98/26*
)
|
||||
|
(
C++98/26*
)
|
||||
|
(
C++98/26*
)
|
||||
| Synchronized Output | ||||
|
(C++20)
|
||||
| Types | ||||
| Error category interface | ||||
|
(C++11)
|
||||
|
(C++11)
|
| Member functions | ||||
| State functions | ||||
| Formatting | ||||
| Miscellaneous | ||||
|
basic_ios::narrow
|
||||
| Protected member functions | ||||
|
(C++11)
|
||||
|
(C++11)
|
||||
|
(C++11)
|
|
char
narrow
(
char_type c,
char
dfault
)
const
;
|
||
현재 로케일별 문자
c
를 표준 등가물로 변환합니다. 결과는 필요한 경우
char_type
에서
char
로 변환됩니다. 변환을 수행할 수 없는 경우, 함수는
dfault
를 반환합니다.
효과적으로 다음을 호출합니다: std:: use_facet < std:: ctype < char_type > > ( getloc ( ) ) . narrow ( c, dfault ) ; .
매개변수
| c | - | 변환할 문자 |
| dfault | - | 변환이 실패한 경우 반환할 문자 |
반환값
문자를 표준 등가물로 변환한 후 char 로 변환됩니다. dfault 는 변환이 실패할 경우 반환됩니다.
참고 항목
|
문자 확장
(public member function) |
|
do_narrow
호출
(
std::ctype<CharT>
의 public member function)
|
|
|
가능한 경우 와이드 문자를 단일 바이트 좁은 문자로 변환
(function) |