I want users to be able to enter values ββabove 0 for the amount of money in my application. Thus, 0.0 or any representation of zero would be unacceptable, but, for example, 0.1 would be accepted.
To do this, I planned to get the NSString float value and compare it to 0.0, but this will not work, since our decimal numbers should be separated by a comma, always (due to business requirements). If the commas were periods, then the comparison performs the task.
What is the most worthy way to replace commas with dots in my texts?
PS: The user is limited to enter only numbers and only one comma, for the decimal part. And actually I was wondering if this could be sthg, which could be done using formatters numbers or so ...
thanks in advance
floating-point objective-c nsstring
aslisabanci
source share