fixedwidthright(
TEXT
,
WIDTH
)

The fixedwidthright( function this function makes the text a fixed width, padding on the left with spaces if necessary.


Parameters

This function has two parameters:

text – the original text.

width – desired number of characters.


Description

This function makes the text a fixed width. If the text is shorter than the specified width, it is padded with spaces on the left (i.e. the text is right justified). If it is longer than the specified width, it is cut off on the left.

fixedwidthright("abcd xyz",12)+" tab" ☞     abcd xyz tab
fixedwidthright("abcd",12)+" tab"     ☞         abcd tab

Note that this makes the text a fixed number of characters – it does not take variable character width based on fonts into account.

Note: This function is equivalent to:

(rep(" ",thewidth)+thetext)[-thewidth,-1]

See Also


History

VersionStatusNotes
10.0No ChangeCarried over from Panorama 6.0.