Page 1 of 1
Displaying commas
Posted: Tue Jul 30, 2002 6:17 pm
by ace2600
Is it possible to display commas when echoing a integer? Ex: 1234 would be displayed as 1,234
-Ace
Posted: Tue Jul 30, 2002 6:55 pm
by volka
Posted: Tue Jul 30, 2002 9:03 pm
by ace2600
Wow, that was easy to use. Does anyone know if they have a function like this number_format in the standard libraries of c or c++? I know this is php but its pretty much the same.
-Ace
Posted: Tue Jul 30, 2002 10:14 pm
by volka
for STL there is
num_put that makes use of
numpunct of the locale settings.
I'm not quite sure if printf makes use of the grouping-field in
lconv