将NSString转换为NSInteger? [英] Convert NSString to NSInteger?
本文介绍了将NSString转换为NSInteger?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我想将字符串
数据
转换为 NSInteger
。
推荐答案
如果字符串是数字的人类可读表示,您可以这样做:
If the string is a human readable representation of a number, you can do this:
NSInteger myInt = [myString intValue];
这篇关于将NSString转换为NSInteger?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文