std::basic_ios<CharT,Traits>:: fill
From cppreference.net
C++
Input/output library
| 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)
|
std::basic_ios
| Member functions | ||||
| State functions | ||||
| Formatting | ||||
|
basic_ios::fill
|
||||
| Miscellaneous | ||||
| Protected member functions | ||||
|
(C++11)
|
||||
|
(C++11)
|
||||
|
(C++11)
|
|
CharT fill
(
)
const
;
|
(1) | |
|
CharT fill
(
CharT ch
)
;
|
(2) | |
管理用于将输出转换填充至指定字段宽度的填充字符。
1)
返回当前填充字符。
2)
将填充字符设置为
ch
,返回填充字符的先前值。
目录 |
参数
| ch | - | 用作填充字符的字符 |
返回值
函数调用前的填充字符。
示例
运行此代码
输出:
With default setting : [ 40] Replaced ' ' with 'x': [xxxxxxxx40]
参见
|
修改填充字符
(函数模板) |