`
zl4393753
  • 浏览: 333099 次
  • 性别: Icon_minigender_1
  • 来自: 武汉
社区版块
存档分类
最新评论

Objective-C 字符串与数值互相转换

阅读更多
NSString 转为 int

NSString *tempString = @"110";
int i = [tempString intValue];


int 转为 NSString

int tempNumber = 110;
NSString *tempString = [NSString stringWithFormat:@"%d", tempNumber];


分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics