09.02.2010, 01:34
Sorry if this sounds rude, but I made this a while ago and it works like the PHP substr_count() function:
pawn Код:
stock substr_count( substring[], string[] )
{
new tmpcount;
for( new i = 0; i < strlen( string ); i++)
{
if( strfind( string[ i ], substring, true ) )
{
tmpcount++;
}
}
return tmpcount;
}