string - Java - Need Parse Help for dollar amounts -


i'm trying figure out way parse "$" , "," out of dollar amount.

for example, have string $5,600. need parse have left 5600. great appreciated.

thank you, kevin

you use numberformat

 numberformat format = numberformat.getcurrencyinstance();  number number = format.parse("$5,600"); 

number 5600

you can specify locale if want target special countries.


Comments

Popular posts from this blog

Python __call__ special method practical example -

arrays - jQuery - Retrieve values from HTML elements and return their sum -