rwlogo
SourcePro C++ 12.0

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWUString::Pad Class Reference
[Unicode String Processing]

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

List of all members.

Public Member Functions

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

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;

Constructor & Destructor Documentation

RWUString::Pad::Pad ( const RWUString::Pad source  )  [inline]

Constructs copy of a manipulator instance.

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

Constructs a manipulator instance.

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

Constructs a manipulator instance.

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

Constructs a manipulator instance.

 All Classes Functions Variables Typedefs Enumerations Enumerator Friends

© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.