strcount function?
#2

pawn Код:
str_countcharacters(str[], char)
{
    new c;
    for(new i, l = strlen(str); i < l; i++)
        if(str[i] == char)
            c++;
    return c;
}
Not tested, but should work

Example:
pawn Код:
printf("%d", str_countcharacters("341,141,514,141", ','));
Reply


Messages In This Thread
strcount function? - by lolumadd - 12.06.2010, 17:34
Re: strcount function? - by ziomal432 - 12.06.2010, 17:52
Re: strcount function? - by lolumadd - 12.06.2010, 18:09

Forum Jump:


Users browsing this thread: 1 Guest(s)