X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/d8ed3c9a80357e890fe4a927b92437e8f88b6b7c..01cdd74060b063287784d3aff7f9f861a404b789:/stglibs/common.lib/include/stg/common.h diff --git a/stglibs/common.lib/include/stg/common.h b/stglibs/common.lib/include/stg/common.h index b4b53530..263cfe37 100644 --- a/stglibs/common.lib/include/stg/common.h +++ b/stglibs/common.lib/include/stg/common.h @@ -95,6 +95,7 @@ void SwapBytes(int64_t & value); std::string & TrimL(std::string & val); std::string & TrimR(std::string & val); std::string & Trim(std::string & val); +std::string Trim(const std::string & val); std::string ToLower(const std::string & value); std::string ToUpper(const std::string & value); @@ -113,6 +114,8 @@ bool WaitPackets(int sd); //----------------------------------------------------------------------------- int str2x(const std::string & str, int32_t & x); int str2x(const std::string & str, uint32_t & x); +inline +int str2x(const std::string & str, double & x) { return strtodouble2(str.c_str(), x); } #ifndef WIN32 int str2x(const std::string & str, int64_t & x); int str2x(const std::string & str, uint64_t & x);