NSString * str = @"This is a test.";
BOOL isPreThis = [str hasPrefix:@"This"];
BOOL isSuffixTest = [str hasSuffix:@"test."];
字符串前缀后缀的判断。
NSString * str = @"This is a test.";
BOOL isPreThis = [str hasPrefix:@"This"];
BOOL isSuffixTest = [str hasSuffix:@"test."];
字符串前缀后缀的判断。
转载于:https://my.oschina.net/yanxue1825/blog/709283