Check out example codes for "c++ split at character". It will help you in understanding the concepts better.

Code Example 1

std::stringstream test("this_is_a_test_string");
std::string segment;
std::vector<std::string> seglist;

while(std::getline(test, segment, '_'))
{
   seglist.push_back(segment); //Spit string at '_' character
}

Learn ReactJs, React Native from akashmittal.com