📅  最后修改于: 2022-03-11 14:44:53.363000             🧑  作者: Mango
std::stringstream test("this_is_a_test_string");
std::string segment;
std::vector seglist;
while(std::getline(test, segment, '_'))
{
seglist.push_back(segment); //Spit string at '_' character
}