Text.PadStart

Syntax

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

About

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

示例 1

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

用法

Text.PadStart("Name", 10)

输出

"      Name"

示例 2

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

用法

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

输出

"||||||Name"