code.cpp 193 B

123456789
  1. /* Create a function that removes the first
  2. * and last characters from a string.
  3. */
  4. std::string removeFirstLast(std::string str) {
  5. str.erase(str.size()-1);
  6. str.erase(0,1);
  7. return str;
  8. }