X-Git-Url: https://git.stg.codes/stg.git/blobdiff_plain/b3d4b1a28e293d8bb346de5ccda0a3fddda2a0b6..56dfcde5734ec014f33973d3be50405b583dfa31:/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 1dd8c1c7..fe3b3af2 100644 --- a/stglibs/common.lib/include/stg/common.h +++ b/stglibs/common.lib/include/stg/common.h @@ -107,7 +107,7 @@ while (pos != std::string::npos) { res.push_back(conv(value.substr(startPos, pos - startPos))); startPos = pos + 1; - pos = value.find_first_of(delim, pos); + pos = value.find_first_of(delim, pos + 1); } res.push_back(conv(value.substr(startPos, pos - startPos))); return res; @@ -139,6 +139,11 @@ int ParseYesNo(const std::string & str, bool * val); bool WaitPackets(int sd); +bool ReadAll(int sd, void * dest, size_t size); +bool WriteAll(int sd, const void * source, size_t size); + +std::string ToPrintable(const std::string & src); + //----------------------------------------------------------------------------- int str2x(const std::string & str, int32_t & x); int str2x(const std::string & str, uint32_t & x);