Formatting Class
The Currency Module makes it easy to output decimal numbers in a very wide variety of numeric formats.
RWDecimalFormat provides a layered interface to the formatting facilities. This lets you format output quickly and easily without any loss in functionality.
For simple formats, all you have to do is supply a string that visually indicates how the number should look. For example, you can format the number -4.23 as "($4.23)" using the picture string (__$.__).
More complicated formats are handled by manipulating the parameters in a formatting object. You can set leading text, trailing text, digit group separators, currency symbols, plus and minus signs and many other parameters. You can even change the formatting at run time in response to, for example, input from a graphical user interface.