Neaten-up examples.
This commit is contained in:
parent
fd412e16c5
commit
b0b34d7ed5
|
@ -82,7 +82,6 @@ defaults to three.
|
|||
The type specifier approach is locale aware. The picture formatting only
|
||||
offers a COMMA as a thousands separator::
|
||||
|
||||
String.Format("{0:c}", 12400) ==> "$12,400"
|
||||
String.Format("{0:n}", 12400) ==> "12,400"
|
||||
String.Format("{0:0,0}", 12400) ==> "12,400"
|
||||
|
||||
|
@ -106,7 +105,7 @@ The proposal works well with floats, ints, and decimals.
|
|||
It also allows easy substitution for other separators.
|
||||
For example::
|
||||
|
||||
format(n, "6,f").replace(",", "_")
|
||||
format(n, "6,d").replace(",", "_")
|
||||
|
||||
This technique is completely general but it is awkward in the
|
||||
one case where the commas and periods need to be swapped::
|
||||
|
|
Loading…
Reference in New Issue