sizeof/strlen - 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: sizeof/strlen (
/showthread.php?tid=268171)
sizeof/strlen -
Roko_foko - 11.07.2011
Is there any difference between sizeof() and strlen()? If yes, what's are they?
Re: sizeof/strlen -
Jeffry - 11.07.2011
sizeof is the size of a string.
Ex:
pawn Код:
new string[128];
sizeof(string) == 128
strlen is the lenght of a string
Ex:
pawn Код:
new string[128];
format(string, 128, "Hai!");
strlen(string) == 4
Jeffry
Re: sizeof/strlen -
Roko_foko - 11.07.2011
oh thanks