Convert NSString to int
1 | NSString *aNumberString = @"123"; |
2 | int i = [aNumberString intValue]; |
Convert int to NSString
1 | int aNumber = 123; |
2 | NSString *aString = [NSString stringWithFormat:@"%d", aNumber]; |
本文共 254 字,大约阅读时间需要 1 分钟。
Convert NSString to int
1 | NSString *aNumberString = @"123"; |
2 | int i = [aNumberString intValue]; |
Convert int to NSString
1 | int aNumber = 123; |
2 | NSString *aString = [NSString stringWithFormat:@"%d", aNumber]; |
转载于:https://my.oschina.net/junfrost/blog/155341