Check out example codes for "remove last character from string swift". It will help you in understanding the concepts better.
Code Example 1
var str = "bla"
str.removeLast() // returns "a"; str is now "bl"
Learn ReactJs, React Native from akashmittal.com