Connecting Tech Pros Worldwide Forums | Help | Site Map

right-justify formatted integers

John A Grandy
Guest
 
Posts: n/a
#1: Sep 5 '08
How to string format an integer to be right-justified within a field width
of a specified number of characters ?

in the following example , 'x' denotes space character

xxxx0
xxxx1
....
xxxx9
xxx10
xxx11



=?ISO-8859-1?Q?Arne_Vajh=F8j?=
Guest
 
Posts: n/a
#2: Sep 6 '08

re: right-justify formatted integers


John A Grandy wrote:
Quote:
How to string format an integer to be right-justified within a field width
of a specified number of characters ?
>
in the following example , 'x' denotes space character
>
xxxx0
xxxx1
...
xxxx9
xxx10
xxx11
String.Format("{0,5}", v)

is one way.

Arne
Closed Thread