Question
4
Replies
5323
Views
Posted: September 12, 2016
Last activity: September 28, 2016
Closed
Solved
Left or Right pad a string
I couldn't find a built-in function to left/right pad a string with a given character. Is there one available?
For example I want to left pad with zeros for string 'xyz' so that the total length is 5.
Output should be '00xyz'
Thanks,
-Sri
You need to use a Map Structured rule.This rule type allows you to define a length and whether you want to left or right pad to reach that length. You can also specify what character to pad with