How can I format a String number to have commas and round?

What is the best way to format the following number that is given to me as a String?

String number = "1000500000.574" //assume my value will always be a String

I want this to be a String with the value: 1,000,500,000.57

How can I format it as such?

131
задан Sheehan Alam 8 September 2010 в 23:38
поделиться