Check out example codes for "remove or erase first and last character of string c++". It will help you in understanding the concepts better.

Code Example 1

str.pop_back(); // removes last /back character from str
str.erase(str.begin()); // removes first/front character from str

Learn ReactJs, React Native from akashmittal.com