到万,

+ (NSString*)countStr:(int)count

{

    NSString* countStr = [NSString stringWithFormat:@"%d", count];

    if (count >= 10000) {

        float c = count / 10000.0f;

        if (c - (int)c >= .1f) {

            countStr = [NSString stringWithFormat:@"%.1f", c];

        }

        else {

            countStr = [NSString stringWithFormat:@"%.0f", c];

        }

    }

    return countStr;

}

原文地址:https://www.cnblogs.com/guligei/p/3346726.html