From 73b52a15ced23c28b1f2a5a547a401441f43310e Mon Sep 17 00:00:00 2001 From: Fulgen301 Date: Sat, 10 Jun 2017 13:22:21 +0200 Subject: [PATCH] Remove StringToInteger function --- planet/System.ocg/String.c | 18 +----------------- 1 file changed, 1 insertion(+), 17 deletions(-) diff --git a/planet/System.ocg/String.c b/planet/System.ocg/String.c index 7e13b2ee9..42c96b3f8 100644 --- a/planet/System.ocg/String.c +++ b/planet/System.ocg/String.c @@ -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; -} +} \ No newline at end of file