removing leading zero from an LCD

If someone could explain how this works and if it the best way to go about doing it this way it would be great.

Once something gets printed on the LCD, it stays there until something new is written over it. That new thing can be a space, which erases the character that was there.

In that code, the value is converted to a string (presumably). So, 13 gets convert to '"13". 9 gets converted to "09", apparently.

That code then leaves "13" alone, but moves the 9 to the 0 position in "09", and then puts a space in the second position, so the string becomes "9 ".

Seeing the rest of the code would be useful.

Is it the best way? No. Formatting the string correctly in the first place would be better/faster/easier.