SHARE
TWEET

Untitled

a guest Mar 18th, 2019 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <sstream>
  2. #include <string>
  3.  
  4. std::vector<std::string> split(const std::string& s, char delimiter)
  5. {
  6.   std::vector<std::string> tokens;
  7.   std::string token;
  8.   std::istringstream tokenStream(s);
  9.  
  10.   while (std::getline(tokenStream, token, delimiter))
  11.   {
  12.     tokens.push_back(token);
  13.   }
  14.  
  15.   return tokens;
  16. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top