跳到主要内容

Text.PadEnd

通过填充给定文本的尾部,返回指定长度的文本。

Syntax

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

Remarks

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

Examples

Example #1

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

Text.PadEnd("Name", 10)

Result:

"Name "

Example #2

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

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

Result:

"Name||||||"

Category

Text.Transformations