\n
) is inside of another string?std::count
is a thing if you are only looking for a characterint count(const char *s, char c)
{
int count = 0;
for(;*s; s++) if(*s == c) count++;
return count;
}
c++
int count(const char * pStr, char char, size_t len)
{
int c = 0;
for (int i = 0; i < len; i++)
{
if (pStr[i] == char)
{
c++;
}
}
returnc;
}
while((str = strstr(str. "Substring")) count++;
for(;(str = strstr(str, "subst")); str++)
"DDNet " GAME_RELEASE_VERSION " (" CONF_PLATFORM_STRING "; " CONF_ARCH_STRING ")"