Page 1 of 1

Left Pad a string with specified character

Posted: Wed Mar 18, 2009 1:50 am
by abhilashnair
How do I left pad an input string with a specific character and get the desired output? For example, if the input is ABC I want to pad X to the left of ABC and get the output as XABC

Posted: Wed Mar 18, 2009 2:16 am
by ray.wurlod
For that specific case, with "X" as the pad character and 4 as the width of the output:

Code: Select all

Right(Str("X",4):InLink.TheField, 4)
Generalize to other requirements.