29 std::string str) A_INLINE;
33 std::string item =
trim(str);
34 const size_t sz = item.size();
38 str[sz - 1] ==
'\"' &&
41 item = item.substr(1, sz - 2);
43 tokens.push_back(item);
49 tokens.push_back(item);
54 const size_t pos) A_INLINE;
59 size_t idx = str.find(quote, pos);
61 idx != std::string::npos &&
64 idx = str.find(quote, idx + 1);
70 const std::string &separator,
71 const char quote) A_INLINE;
73 const std::string &separator,
80 size_t idx1 =
findAny(str, separator, pos);
83 if (idx2 == std::string::npos)
85 else if (idx1 == std::string::npos)
86 return std::string::npos;
91 if (idx2 == std::string::npos)
92 return std::string::npos;
105 const std::string &separator,
110 while (idx != std::string::npos)
112 std::string item = text.substr(0, idx);
114 text = text.substr(idx + 1);
std::string trim(std::string const &str)
static size_t findNextSplit(const std::string &str, const std::string &separator, const char quote) A_INLINE
static size_t findNextQuote(const std::string &str, const char quote, const size_t pos) A_INLINE
bool splitParameters(StringVect &tokens, std::string text, const std::string &separator, const char quote)
static void addToken(StringVect &tokens, std::string str) A_INLINE
std::string & replaceAll(std::string &context, const std::string &from, const std::string &to)
size_t findAny(const std::string &text, const std::string &chars, const size_t pos)
std::vector< std::string > StringVect