How to pad text easily.The usual
application of this is for file names where one need numerically named
files to appear sequentially instead of 1, 10, 2 but there are other
applications as well. A long tie ago I came up with mildly complex
algorithms to accomplish this but I found a quick and dirty way using
the Pad Text capability with a twist. This also comes in handy when
using an integer repeat counter to create sequential file names.

The trick is to replace all occurrences of the space with a zero!
Remove padding: In order to convert a padded number back
simply convert to an integer and, if needed, convert back to a text
string.
Pad.mex
Page last updated:
02/05/2008