------- iOS培训、android培训、java培训、期待与您交流! ---------- #import <Foundation/Foundation.h> void test1(){NSString *s1 = @"http://www.baidu.com"; //1 从xx位置,到最后结束(包含起始位置) NSString *s2 = [s1 substringFromIndex:5]; NSLog(@"s2 = %@",s2); |
黑马程序员——OC基础之字符串截取及替换
![](https://img-home.csdnimg.cn/images/20240711042549.png)