Advertisement
Guest User

Untitled

a guest
Jun 25th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.24 KB | None | 0 0
  1. std::string getMsg(std::string res)
  2.  
  3. {
  4.  
  5.     size_t f = res.find(" :");
  6.     if (f == std::string::npos)
  7.         return std::string();
  8.  
  9.  
  10.     size_t p = res.find("\r\n");
  11.  
  12.     if (p != std::string::npos)
  13.  
  14.         res.erase(p);
  15.  
  16.  
  17.  
  18.     return res.substr(f+2);
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement