Remove StringToInteger function

install-platforms
Fulgen301 2017-06-10 13:22:21 +02:00 committed by Nicolas Hake
parent f44aaf6ff7
commit 73b52a15ce
1 changed files with 1 additions and 17 deletions

View File

@ -49,20 +49,4 @@ global func CharIsLowerCase(int char)
global func CharIsUpperCase(int char)
{
return Inside(char, 65, 90);
}
// Converts a string to an integer if it consists of digits only.
global func StringToInteger(string str)
{
var integer = 0;
var power = 0;
for (var index = GetLength(str) - 1; index >= 0; index--)
{
var char = GetChar(str, index);
if (!CharIsDigit(char))
return nil;
integer += (char - 48) * 10**power;
power++;
}
return integer;
}
}