您的位置:首页 > 其它

技巧-length长度方法characterAtIndex:索引指定位置方法

2013-08-16 11:05 232 查看
length长度方法characterAtIndex:索引指定位置方法

NSString *astring = [NSString stringWithFormat:@"The number is %d", 520];
NSLog(@"%d", [astring length]);    // 17
NSLog(@"%c", [astring characterAtIndex:2]);   // e
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: