diff --git a/confutils.nim b/confutils.nim index 2bda826..41506dc 100644 --- a/confutils.nim +++ b/confutils.nim @@ -8,7 +8,13 @@ proc parse*(T: type DirPath, p: TaintedString): T = result = DirPath(p) template parse*(T: type string, s: TaintedString): string = - string(s) + string s + +proc parse*(T: type SomeSignedInt, s: TaintedString): T = + T parseInt(string s) + +proc parse*(T: type SomeUnsignedInt, s: TaintedString): T = + T parseUInt(string s) proc load*(Configuration: type, cmdLine = commandLineParams(),