How to parse negative number strings?
strings may be of the form:
-123.23
(123.23)
123.23-
is there a class that will convert a
"-123.23" can be parsed with Float.valueOf("-123.23"); or Double.valueOf("-123.23");
"(123.23)" and "123.23-" are invalid and need to be improved/parsed by yourself. You could go through the string step by step and check if it is a number, if so add it to a new string. If you find a - at the beginning or the end, make it than negative...