Text.PadEnd

Syntax

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

About

text通过在文本值末尾插入空格,返回填充为长度count的值text。 可选字符 character 可用于指定用于填充的字符。 默认填充字符为空格。

示例 1

填充文本值的末尾,使其长度为 10 个字符。

用法

Text.PadEnd("Name", 10)

输出

"Name      "

示例 2

用“|”填充文本值的末尾,使其长度为 10 个字符。

用法

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

输出

"Name||||||"