代码如下:
//判断StringA是否含有 StringB
if([StringA rangeOfString:StringB].location !=NSNotFound)
{
NSLog(@"yes");
}
else
{
NSLog(@"no");
}
代码如下:
//判断StringA是否含有 StringB
if([StringA rangeOfString:StringB].location !=NSNotFound)
{
NSLog(@"yes");
}
else
{
NSLog(@"no");
}