标签:
NSString *string1 = @"iphone";
BOOL isStart = [string2 hasPrefix:@"ip"];
NSLog(@"%d",isStart);
BOOL isEnd= [string2 hasSuffix:@"ne"];
NSLog(@"%d",isEnd);
判断字符串的是否以指定字符串开始或结束
原文地址:http://www.cnblogs.com/as5346/p/4471633.html