hedgewars/uFLUtils.pas
branchqmlfrontend
changeset 10616 20a2d5e6930a
parent 10517 844bd43db47a
child 10757 f71275973737
--- a/hedgewars/uFLUtils.pas	Sun Dec 07 22:22:39 2014 +0300
+++ b/hedgewars/uFLUtils.pas	Thu Dec 18 00:03:53 2014 +0300
@@ -3,6 +3,7 @@
 
 function str2PChar(const s: shortstring): PChar;
 function intToStr(n: LongInt): shortstring;
+function strToInt(s: shortstring): LongInt;
 function midStr(s: shortstring; pos: byte): shortstring;
 procedure underScore2Space(var s: shortstring);
 
@@ -27,6 +28,11 @@
     str(n, intToStr)
 end;
 
+function strToInt(s: shortstring): LongInt;
+begin
+val(s, strToInt);
+end;
+
 function midStr(s: shortstring; pos: byte): shortstring;
 begin
     midStr:= copy(s, pos, length(s) - pos + 1)