I want the users to be able to input values above 0 for a money amount in my application. So 0,0 or any representation of zero will be unacceptable but 0,1 will be accepted, for example.
In order to do this, I was planning to get the float value of NSString and compare it to 0.0 but this does not work since our decimal numbers need to be seperated with comma, always (due to a business requirement). If the commas were dots, then the comparison does the job.
What’s the most decent way to replace commas with dots in my amount texts?
PS: The user is limited to enter only numbers and just one comma, for the decimal part.
And actually I was wondering if this is sthg that could be done with number formatters or so…
Thx in advance
You could just use
stringByReplacingOccurrencesOfString