iOS 判断Objective-C 字符串是否已i开头 you结尾 2016-01-04 09:22:00 iOS 判断Objective-C 字符串是否已i开头 you结尾 NSString *str = [NSString stringWithFormat:@"i Love you"]; [str hasPrefix:@"i"] && [str hasSuffix:@"you"] == YES ? NSLog(@"是已i开头you结尾") : NSLog(@"不是已i开头you结尾"); 当前页面是本站的「Baidu MIP」版。发表评论请点击:完整版 »