Added feature request at18988

This commit is contained in:
David Anderson 2005-09-15 17:53:02 +00:00
parent f58c0f4508
commit 4b1769f457

View File

@ -126,3 +126,16 @@ 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
stock bool:is_str_num(sString[])
{
new i = 0, len = strlen(sString);
do
{
if (!isdigit(sString[i]))
return false;
} while (i++ < len);
return true;
}