SHARE
TWEET

Untitled

a guest Dec 19th, 2018 56 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. string Menu::trim(const string& str)
  2. {
  3.     size_t first = str.find_first_not_of(' ');
  4.     if (string::npos == first)
  5.     {
  6.         return str;
  7.     }
  8.     size_t last = str.find_last_not_of(' ');
  9.     return str.substr(first, (last - first + 1));
  10. }
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