Check out example codes for "delete last char of string C++". It will help you in understanding the concepts better.

Code Example 1

st = myString.substr(0, myString.size()-1);

Learn ReactJs, React Native from akashmittal.com