标签:
-(int)getAppearCount:(NSString *)withStr{
NSString *searchStr = @"#BLANK#";
int count=0;
for (int i = 0; i < withStr.length - searchStr.length + 1; i++)
{
if ([[withStr substringWithRange:NSMakeRange(i, searchStr.length)] isEqualToString:searchStr])
{
count++;
}
}
return count;
}
标签:
原文地址:http://www.cnblogs.com/xiangjune/p/4997053.html