Skip to main content

Text.PadEnd

Returns text of a specified length by padding the end of the given text.

Syntax

Text.PadEnd(
text as text,
count as number,
optional character as text
) as text

Remarks

Returns a text value padded to length count by inserting spaces at the end of the text value text. An optional character character can be used to specify the character used for padding. The default pad character is a space.

Examples

Example #1

Pad the end of a text value so it is 10 characters long.

Text.PadEnd("Name", 10)

Result:

"Name      "

Example #2

Pad the end of a text value with "|" so it is 10 characters long.

Text.PadEnd("Name", 10, "|")

Result:

"Name||||||"

Category

Text.Transformations