You could also add printf() support to the Print class which would allow better/easier formatting.
http://playground.arduino.cc/Main/Printf
(The latest Teensy code has this already built in)
It does come with a cost of a few k of flash, but if you are not tight on flash then it can be worth it.
This will allow you do things like:
lcd.printf("%4d", encoder0Pos); // print an integer in a fixed width 4 position field - left padded with spaces
lcd.printf("%04d", encoder0Pos); // print an integer in a fixed width 4 position field - left padded with zeros
You can also left justify, using other format specifiers.
--- bill