Building a string that starts with a number and the second part of the
string is to have a common indent
I'm building a value to display in a dropdown Select box. This value
consists of a currency value, then a username. What I would like is that
the usernames all start with the same indent.
Ex (what I have currently):
$1,000 UserA
$100 UserB
$10 UserC
What I would like:
$1,000 UserA
$100 UserB
$10 UserC
or even better:
$1,000 UserA
$100 UserB
$10 UserC
As I see the third list as the most readable.
Is there an easy way to do this without writing a function where I examine
the max length, and then format it manually or a "cheat" to accomplish
this?
No comments:
Post a Comment