mirror of
https://github.com/alliedmodders/amxmodx.git
synced 2025-01-26 13:48:03 +03:00
fixed bug at19374
This commit is contained in:
parent
b00d313ee8
commit
94308b208a
@ -127,17 +127,15 @@ 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
|
/* Tests if given string contains only digits */
|
||||||
stock bool:is_str_num(sString[])
|
stock bool:is_str_num(sString[])
|
||||||
{
|
{
|
||||||
new i = 0, len = strlen(sString);
|
new i = 0;
|
||||||
|
|
||||||
do
|
while (sString[i] && isdigit(sString[i])
|
||||||
{
|
++i;
|
||||||
if (!isdigit(sString[i]))
|
|
||||||
return false;
|
return sString[i] == 0 && i != 0;
|
||||||
} while (i++ < len);
|
|
||||||
return true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* It is basically strbreak but you have a delimiter that is more than one character in length.
|
/* It is basically strbreak but you have a delimiter that is more than one character in length.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user