S
StephaneLeFou
Hi,
I have a function which receives an amount (money) in fthe form of a
String. The values received can be of various formats such as:
"99,999.99"
"99 999.99"
"99 999 99"
"99999999"
and so on, depending on the user's input, because the input has not
been formatted yet with the Struts Validator for example...
However, the maximum valid number is: 99999.99d
I'm trying to figure out a way of checking if the passed String (once
parsed and so on) is no bigger than 99999.99d
So far I've been unsuccessful with the parse() and format() with
NumberFormat. Sometimes, it converts it to a double, sometimes to a
long...
Any help would be greatly appreciated.
Thanks.
I have a function which receives an amount (money) in fthe form of a
String. The values received can be of various formats such as:
"99,999.99"
"99 999.99"
"99 999 99"
"99999999"
and so on, depending on the user's input, because the input has not
been formatted yet with the Struts Validator for example...
However, the maximum valid number is: 99999.99d
I'm trying to figure out a way of checking if the passed String (once
parsed and so on) is no bigger than 99999.99d
So far I've been unsuccessful with the parse() and format() with
NumberFormat. Sometimes, it converts it to a double, sometimes to a
long...
Any help would be greatly appreciated.
Thanks.