X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/bd30fed6d51a05e51fe89175dc1b84c5cfc79262..38ee45741b7e4265cb763a9c20368d278ec0031f:/stglibs/common.lib/common.h diff --git a/stglibs/common.lib/common.h b/stglibs/common.lib/common.h index f924867b..19a8773e 100644 --- a/stglibs/common.lib/common.h +++ b/stglibs/common.lib/common.h @@ -34,8 +34,8 @@ #endif #include -#include "os_int.h" -#include "stg_const.h" +#include "stg/os_int.h" +#include "stg/const.h" #define STAT_TIME_3 (1) #define STAT_TIME_2 (2) @@ -98,6 +98,13 @@ std::string & Trim(std::string & val); std::string IconvString(const std::string & source, const std::string & from, const std::string & to); +int ParseInt(const std::string & str, int * val); +int ParseUnsigned(const std::string & str, unsigned * val); +int ParseIntInRange(const std::string & str, int min, int max, int * val); +int ParseUnsignedInRange(const std::string & str, unsigned min, + unsigned max, unsigned * val); +int ParseYesNo(const std::string & str, bool * val); + //----------------------------------------------------------------------------- template int str2x(const std::string & str, varT & x)