SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches

Iostream manipulator that supports the insertion of the contents of an RWUString into an output stream, with padding to fill the full field width of the stream. More...

#include <rw/i18n/RWUString.h>

Inheritance diagram for RWUString::Pad:
RWBasicUString::Pad

Public Member Functions

 Pad (const RWUConstSubString &ustr, RWUChar32 codePoint=static_cast< RWUChar32 >(0x0020))
 
 Pad (const RWUString &ustr, RWUChar32 codePoint=static_cast< RWUChar32 >(0x0020))
 
 Pad (const RWUString::Pad &source)
 
 Pad (const RWUSubString &ustr, RWUChar32 codePoint=static_cast< RWUChar32 >(0x0020))
 
- Public Member Functions inherited from RWBasicUString::Pad
 Pad (const Pad &source)
 
 Pad (const RWBasicUString &ustr, RWUChar32 codePoint=RWBasicUString::DefaultFillCharacter)
 

Additional Inherited Members

- Public Attributes inherited from RWBasicUString::Pad
RWUChar32 codePoint_
 
const RWUChar16data_
 
size_t length_
 

Detailed Description

RWUString::Pad defines an iostream manipulator that can be used to insert the contents of an RWUString ustr into an output stream os, padding the string with the specified fill character until os.width() code points have been written to the stream.

If the length of ustr is greater than os.width(), the string is truncated and no padding occurs. If os.width() is zero, the entire contents of the string are inserted into the stream and no padding occurs.

An RWUString::Pad instance is only valid as long as the source string remains unchanged. Do not create persistent instances of this class; this class should only be instantiated as a temporary in an insertion expression.

RWUString ustr = ...;
std::cout << RWUString::Pad(ustr, static_cast<RWUChar32>('.'))
<< std::endl;
Stores and manipulates Unicode character sequences encoded as UTF-16 code units.
Definition RWUString.h:187

Constructor & Destructor Documentation

◆ Pad() [1/4]

RWUString::Pad::Pad ( const RWUString::Pad & source)
inline

Constructs copy of a manipulator instance.

◆ Pad() [2/4]

RWUString::Pad::Pad ( const RWUString & ustr,
RWUChar32 codePoint = static_cast<RWUChar32>(0x0020) )
inline

Constructs a manipulator instance.

◆ Pad() [3/4]

RWUString::Pad::Pad ( const RWUSubString & ustr,
RWUChar32 codePoint = static_cast<RWUChar32>(0x0020) )
inline

Constructs a manipulator instance.

◆ Pad() [4/4]

RWUString::Pad::Pad ( const RWUConstSubString & ustr,
RWUChar32 codePoint = static_cast<RWUChar32>(0x0020) )
inline

Constructs a manipulator instance.

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.