Arduino subtracting chars from strings
You may use remove() method to remove last character.

String s = "1234567890";
while(s.length() &gt; 0) {
    int lastIndex = s.length() - 1;
    s.remove(lastIndex);
    Serial.println(s);
}