#include <iostream>
#include <sstream>
#include <vector>
#include <string>
std::vector<std::string> split(const std::string &text, char delimiter) {
std::vector<std::string> tokens;
std::string token;
std::istringstream tokenStream(text);
while (std::getline(tokenStream, token, delimiter)) {
tokens.push_back(token);
}
return tokens;
}
int main() {
std::string str = "one,two,three";
char delimiter = ',';
std::vector<std::string> tokens = split(str, delimiter);
for (const std::string &token : tokens) {
std::cout << token << std::endl;
}
return 0;
}
01-20
07-10
1842
09-15