I am novice in Objective-c ,i want to know ,in Objective-C, how can I check whether input value is integer or float like 2, 3.00,
here 2 is integer and 3.00 is float data-type
how can i find-out it.Thanks in advance
I am novice in Objective-c ,i want to know ,in Objective-C, how can I check whether input value is integer or float like 2, 3.00,
here 2 is integer and 3.00 is float data-type
how can i find-out it.Thanks in advance
So, the simplest solution is probably to check each string input for a period (.) character (possibly also checking for another number after it) because checking that the number 3.00 and 3 are different is quite hard (because they are only different if you tell them to be).
The easiest way to do that would be with rangeOfString:.