So when I convert a double to a string using something like this:
double number = 1.1;
text = [[NSString alloc] initWithFormat:@"%f", number];
The variable text
ends up printing something like this: 1.100000
. I realize that this is because of the way the computer stores the value however I need an easy way to remove those extra zeros and, if need be, the decimal as well if the number turns out to an integer.
Thanks!