SA-MP Forums Archive
How to count dots in a string? - Printable Version

+- SA-MP Forums Archive (https://sampforum.blast.hk)
+-- Forum: SA-MP Scripting and Plugins (https://sampforum.blast.hk/forumdisplay.php?fid=8)
+--- Forum: Scripting Help (https://sampforum.blast.hk/forumdisplay.php?fid=12)
+---- Forum: Help Archive (https://sampforum.blast.hk/forumdisplay.php?fid=89)
+---- Thread: How to count dots in a string? (/showthread.php?tid=170752)



How to count dots in a string? - Whizion - 24.08.2010

Please give me some example code on how to count dots in a string.

Thank you.


Re: How to count dots in a string? - CJ101 - 24.08.2010

Код:
GetDotCount(string[])
{
	new dots;
    for(new i; i < sizeof(string); i++)
	{
	    if(string[i] == '.') dots++;
	}
	return dots;
}



Re: How to count dots in a string? - Whizion - 24.08.2010

Thank you.