I am trying to erase the last character of a string without "erase()",
from "ABC" to "AB"
I tried setting