This commit is contained in:
jl777
2019-04-02 23:47:37 -11:00
parent 5d861c188a
commit f8b7e0480f
3 changed files with 28 additions and 3 deletions

View File

@@ -394,6 +394,29 @@ void ParseParameters(int argc, const char* const argv[])
}
}
void SplitStr(const std::string& strVal, std::vector<std::string> outVals)
{
stringstream ss(strVal);
vector<std::string> str;
while ( ss.peek() == ' ' )
ss.ignore();
while ( ss >> str )
{
//outVals[numVals] = i;
outVals.push_back(i);
numVals += 1;
while ( ss.peek() == ' ' )
ss.ignore();
if ( ss.peek() == ',' )
ss.ignore();
while ( ss.peek() == ' ' )
ss.ignore();
}
}
void Split(const std::string& strVal, uint64_t *outVals, const uint64_t nDefault)
{
stringstream ss(strVal);