如何在Objective-C中将字符串转换为整数?

时间:2012-12-08 05:32:54

标签: objective-c

  

可能重复:
  How to do string conversions in Objective-C?

如何在Objective-C中将字符串转换为整数?

2 个答案:

答案 0 :(得分:4)

int value = [string intValue];  

答案 1 :(得分:0)

NSInteger value=[string integerValue];