NSString *strttt = @"http://source.hahaha66.cn/1615946279.png";
if ([strttt localizedCaseInsensitiveContainsString:@"cn/"])
{
if ([strttt localizedCaseInsensitiveContainsString:@".png"])
{
NSRange startRange = [strttt rangeOfString:@"cn/"];
NSRange endRange = [strttt rangeOfString:@".png"];
NSRange range = NSMakeRange(startRange.location + startRange.length, endRange.location - startRange.location - startRange.length);
NSString *result = [strttt substringWithRange:range];
XPFLog(@" ===== %@ ", result);
}
}
else
{
XPFLog(@" 失败 ");
}
网友评论