IOS判断字符串是否包含某个字符串

NSRange rangeUrl = [ urlString rangeOfString:@”http://”];//判断字符串是否包含http://
if (rangeUrl.location !=NSNotFound)//包含
{
//todo
}

猜你喜欢

转载自blog.csdn.net/RichieZhu/article/details/50380905