Leading zero's problem

I'm trying to make a 3 digit display using 3 cd4543 multiplexed by (1) 595. I got a program from the Internet which was almost perfect except for the leading zero's. i was successful to tinker the program to display 3 digit, but i'm having a very very hard time removing the leading zero's. Please anyone help!!!!

Code and schematics
http://www.haberocean.com/2015/03/circuit-to-display-the-numbers-pressed-on-a-44-button-pad-in-two-ssds-part-1-of/

Post the code and schematics here please. See the forum sticky post for instructions on how to do that.

I would think that any time the Arduino is about to output a leading zero, the code for zero should be replaced by the code for a blank (and there are a few). Detecting a zero is easy, detecting that the zero is leading is a little harder and is dependent upon how the data is output and how the data is stored.