Extracting Double from String?
Alright guys let's say I have a String:
"\u00A3 3.39 per Unit"
the String displays cost of a product and what I need to do next is get the "3.39" part of the String and continue working with that. How can I extract that number? I was thinking about using a loop with charAt(); Method and just parse it to double but it would extract 003 in front of that String as well since it's a code I must use to get GBP symbol. so does anyone have an elegant solution to this?
should I use loop with charAt();
and then parse?
or does anyone have any other solutions?