hello my name is pm and i just fixed the bug described in 23888

This commit is contained in:
Pavol Marko 2006-01-04 23:23:52 +00:00
parent c9e84c563d
commit 4b51565e3b

View File

@ -127,12 +127,12 @@ native strfind(const string[], const sub[], ignorecase=0, pos=0);
/* Compares two strings with the C function strcmp(). Returns 0 on equal. */
native strcmp(const string1[], const string2[], ignorecase=0);
/* Tests if given string contains only digits */
/* Tests if given string contains only digits. Also, returns false for zero-length strings. */
stock bool:is_str_num(sString[])
{
new i = 0;
while (sString[i] && isdigit(sString[i])
while (sString[i] && isdigit(sString[i]))
++i;
return sString[i] == 0 && i != 0;