objc--NSUInteger and INT 转换问题
2016-04-26 18:10
513 查看
NSMutableString *strT = [[NSMutableString alloc] initWithString:dataStr];//声明一个可变字符串数组/*字符串长度单位是NSUInteger,因为是无符号数,比较过程中发现存在问题,因此用下面的方法将其转换成int类型的,进行比较。*/ NSLog(@"str length=%u",strT.length/2); int myLenght = [[NSString stringWithFormat:@"%u",strT.length] intValue]/2;
相关文章推荐
- objc--int NSUInteger NSInteger NSNumber
- UITextField自定义[转载]
- UILabel自适应文字大小
- POJ 1503 Integer Inquiry
- UINavigationBar初始化以及自定义背景
- IOS-UITableView更改背景以及UITabelViewCell更改背景
- UIBezierPath精讲
- iOS编程——经过UUID和KeyChain来代替Mac地址实现iOS设备的唯一标示(OC版)
- POJ 3245|Sequence Partitioning|动态规划|单调队列
- Android 控件 下拉刷新 android-uitra-pull-to-refresh
- WEB前端为什么这么火,太原UI设计师问你了解web前端吗?
- 七周七种前端框架四:Vue.js 概览
- the user operation is waiting for building workspace to complete解决办法
- 搜狗输入法关于人机交互设计相关评价
- string stringBuffer stringBuilder 区别
- HDU2604 Queuing(矩阵快速幂)
- openstack image guide总结
- Dynamics CRM2016 Set Values of all Data Types using Web API
- Dynamics CRM2016 Set Values of all Data Types using Web API
- Dynamics CRM2016 Set Values of all Data Types using Web API