huidong

首页 | 会员登录 | 关于争取 2022 寒假做出汇东网 Ver3.0.0 !
搜索文章


// 得到某字符串中的某字符串的个数
int findstrnum(const char* old_str, const char* find_str)
{
    const char* p;
    int num = 0;
    while (1)
    {
        p = strstr(old_str, find_str);
        printf("%s\n", p);
        while (p != NULL)
        {
            num++;
            p = p + strlen(find_str);
            p = strstr(p, find_str);
        }
        break;
    }
    
    return num;
}




返回首页


Copyright (C) 2018-2024 huidong