7 std::vector<std::string> output;
12 while ((pos = str.find(delim)) != std::string::npos) {
15 strPart = str.substr(0, pos);
18 str.erase(0, pos + 1);
33 std::string output = strs.at(0);
34 for(
unsigned int i=1; i<strs.size(); ++i){
35 output.push_back(delim);
45 while((str.front()==
' ')||(str.front()==
'\t')||(str.front()==
'\n'))
49 while((str.back()==
' ')||(str.back()==
'\t')||(str.back()==
'\n'))
50 str.erase(str.size()-1,1);
std::string Combine(std::vector< std::string > strs, char delim=',')
Combine a vector of strings with a specified delimiter. The opposite of Split.
std::string Strip(std::string str)
Strip the whitespace off the beginning and end of a string.
std::vector< std::string > Split(std::string str, char delim=',')
Split a string into parts based on a particular character delimiter. Also Strips whitespace from part...