标签:bst make str 字符 nsstring index ios with from
NSString *str = @"my name is jiemu";
1.从第三个字符开始,截取长度为4的字符串
NSString *str2 = [str substringWithRange:NSMakeRange(3,4)];//str2 = "name"
2.截取到第n为(第n位不算在内)
NSString *str3 = [str substringToIndex:2];//str3 = "my"
3.从第n为开始直到最后(包含第n位)
NSString *str4 = [str substringFromIndex:11];//str4 = "jiemu"
标签:bst make str 字符 nsstring index ios with from
原文地址:http://www.cnblogs.com/huskyking/p/6294389.html