Convert int to shortened, formatted string
问题 The user will enter a dollar value as an int , and I'd like to convert the result into a shortened, formatted string. So if the user enters 1700, the string would say "$1.7k". If the user enters 32600000, the string would say "$32.6m". Update Here's the code I have so far. It seems to be working for numbers ~10k. I would just add more if statements for bigger numbers. But is there a more efficient way to do this? NSNumberFormatter *nformat = [[NSNumberFormatter alloc] init]; [nformat