how many times a string is repeated in another string
#4

Use this :
PHP Code:
stock GetQuantityStringInString(haystack[], needle[], ignorecase true)
{
    new 
temp[30], 0;
    for(new 
0strlen(haystack)-strlen(needle); <= l; ++i)
    {
        
strmid(temphaystackii+strlen(needle));
        if(!
strcmp(needletempignorecase))c++;
    }
    return 
c;

Reply


Messages In This Thread

Forum Jump:


Users browsing this thread: 2 Guest(s)