Navigation: FXLV4SpeedTools > Text Functions >

PAD.TEXT function

 

 

 

PAD.TEXT function

Expands (or contracts) a text-string (or range/array of text strings) with one or more repeated Pad characters. Pad characters can be added to the start or end (PadEnd=True) of the text-string.

PAD.TEXT is a multi-threaded, non-volatile array function.

Based on an idea by Kevin (Zorvek) Jones

PAD.TEXT Syntax

PAD.TEXT (Pad, Text, Length, PadEnd)

Pad (Optional, default space)

The characters to use for padding the text string, repeated as required.

Text (Required)

The Text-string(s) to be padded. Can be a range or an array of text-strings.

Length (Required)

The length you want for the output text after padding

PadEnd (Optional, default False)

If False pad the front of the Text-string, if True then pad the end of the Text-string.

When padding the front of the text string characters are taken from the right of the Pad text.

When padding the back of the text-string characters are taken from the left of the Pad text.

PAD.TEXT Examples

PAD.TEXT("X","ABC",5) = XXABC

PAD.TEXT("XYZ","ABC",5) = YZABC

PAD.TEXT("XYZ","ABC",5,TRUE) = ABCXY

PAD.TEXT(,"ABCDEF",5,TRUE) = ABCDE

PAD.TEXT(,"ABCDEF",5,FALSE) = BCDEF

PAD.TEXT("xy","AB",5) = yxyAB

PAD.TEXT("xy","AB",5,TRUE)= ABxyx

 

 

 

Copyright © 2024 Decision Models Ltd