J
John Dinning
In 'C' it was possible to format a string to a fixed length, e.g. to 10
characters:
printf("%10.10s","123456789012345"); would return "1234567890", and
printf("%10.10s","12345"); would return " 12345"
I can find no easy way to do this using string.format in C#.
It is possible to set a minumum length e.g.
string.format("{0,10:s}",12345"); will return a string 10 chars long,
but not a maximum - or am I missing something?
Any help welcome.
John.
characters:
printf("%10.10s","123456789012345"); would return "1234567890", and
printf("%10.10s","12345"); would return " 12345"
I can find no easy way to do this using string.format in C#.
It is possible to set a minumum length e.g.
string.format("{0,10:s}",12345"); will return a string 10 chars long,
but not a maximum - or am I missing something?
Any help welcome.
John.