How do I format my string in GWT?
I made a method
Formatter format = new Formatter();
int matches = 0;
Formatter formattedString = format.forma
See the official page on GWT date and number formatting.
They suggest the following:
myNum decimal = 33.23232;
myString = NumberFormat.getFormat("#.00").format(decimal);
It is best to use their supported, optimized methods, than to cook up your own non-optimal method. Their compiler will be optimizing them all to nearly the same thing anyway in the end.