Categories: MSDN / DotNet / Java / Scripts / Linux / PHP Ask - La ask - La Answer

how do you align currency output to files?

my problem is this whenever i put a number in front of other numbers like so
1. 22.33 65.78 45.57
2. 55.78 24.78 65.19
when i get to ten and then again 100 so on
10. 55.78 58.78 45.25

it pushes the decimal alignment off how can i fix this? I've tried using padding but that doesn't work I'm sure it is something simple but I can't seem to find anything on how to align things in a numbered way like that. Tab works in the java world but not in a text file becuase as you know they usually don't recognize tabs. Any help would be greatly appreciated.
[617 byte] By [blastmaster] at [2007-11-11 8:09:29]
# 1 Re: how do you align currency output to files?
ok how about how do you right justify currency in java?
blastmaster at 2007-11-11 22:36:15 >
# 2 Re: how do you align currency output to files?
What can you find in the resources available to you about Java's resurrection of printf?
nspils at 2007-11-11 22:37:20 >
# 3 Re: how do you align currency output to files?
never mind i see what the problem was I was looking at formatted currency as double when it is really a string thanks though.
blastmaster at 2007-11-11 22:38:24 >