sizeof/strlen
#1

Is there any difference between sizeof() and strlen()? If yes, what's are they?
Reply
#2

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
Reply
#3

oh thanks
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)