Check out example codes for "eosio parse string". It will help you in understanding the concepts better.

Code Example 1

const size_t fb = str.find(",");
  auto d1 = str.substr(0 , fb);
  auto d2 = str.substr(fb + 1);

Learn ReactJs, React Native from akashmittal.com