Added feature request at18988
This commit is contained in:
parent
f58c0f4508
commit
4b1769f457
|
@ -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. */
|
/* Compares two strings with the C function strcmp(). Returns 0 on equal. */
|
||||||
native strcmp(const string1[], const string2[], ignorecase=0);
|
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;
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user