SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Inserts the contents of a Unicode string into an output stream, padding it with a designated fill character. More...
#include <rw/tools/bustring.h>
Public Member Functions | |
Pad (const Pad &source) | |
Pad (const RWBasicUString &ustr, RWUChar32 codePoint=RWBasicUString::DefaultFillCharacter) | |
Public Attributes | |
RWUChar32 | codePoint_ |
const RWUChar16 * | data_ |
size_t | length_ |
Related Symbols | |
(Note that these are not member symbols.) | |
std::ostream & | operator<< (std::ostream &os, const RWBasicUString::Pad &pad) |
Defines an iostream manipulator that can be used to insert the contents of a Unicode string into an output stream, padding the Unicode string with a specified fill character until the entire width()
of the output stream has been filled with code points.
If the length of the Unicode string is greater than the width()
of the output stream, or if the width()
of the output stream is zero, the entire contents of the Unicode string is inserted into the stream and no padding occurs.
A Pad instance is only valid as long as the source string remains unchanged. Do not create persistent instances of this class. It should only be instantiated as a temporary in an insertion expression.
|
inline |
Constructs a copy of source.
|
inline |
Constructs a manipulator instance. The default fill character, specified in the second parameter, is the Unicode space character.
|
related |
Writes the sequence of bytes that are produced when the contents of the RWBasicUString used to construct pad are converted into a UTF-8 representation.
If os.width()
is greater than the number of code points contained in the source string, the output is padded using the code point specified as a parameter to pad. If os.width()
is less than the number of code points contained the source string, the entire contents of the string are inserted into the output stream.
Any padding is inserted after the string if the ios_base::left
format flag is set, or before if ios_base::right
is set or neither flag is set.
RWConversionErr | Thrown to report conversion errors. |
std::ios_base::failure | Thrown to report any errors detected while performing stream operations. |
RWUChar32 RWBasicUString::Pad::codePoint_ |
The code point used to pad the string. The default code point is the Unicode space character.
const RWUChar16* RWBasicUString::Pad::data_ |
The string to pad.
size_t RWBasicUString::Pad::length_ |
The code unit length of the array referenced by data_.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |