陈斌彬的技术博客

Stay foolish,stay hungry

NSString 从字符串开头截取到指定字符的位置

NSRange range = [srcStr rangeOfString:@","];

NSString *str = [srcStr substringToIndex:range.location];

NSLog(@"%@",str);