]> git.stg.codes - stg.git/blobdiff - stglibs/common.lib/common.h
Code deduplication
[stg.git] / stglibs / common.lib / common.h
index 3752822aa728a067481c810d3c9ed3fa99a0314a..19a8773e3d93b031183f989f03a4012d9b66930e 100644 (file)
@@ -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 <typename varT>
 int str2x(const std::string & str, varT & x)