For complicated formatting, or for formats that change at runtime, using pictures may not be flexible enough for your needs. In such cases, you can achieve additional flexibility by directly setting attributes of a formatter object. For example, you can fill in the space between a currency symbol at the far left and the number with stars instead of spaces by using code like this:
RWDecimal<RWMP1Int> amount = "45.94"; RWDecimalFormat format("$________.__"); format.setLeftFillChar('*'); cout << format(amount);// prints $******45.94
There are many attributes that you can modify. A list appears in the RWDecimalFormat entry in the Currency Module Reference Guide.
© 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.