Text.PadStart

语法

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

关于

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

示例 1

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

使用情况

Text.PadStart("Name", 10)

输出

"      Name"

示例 2

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

使用情况

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

输出

"||||||Name"

results matching ""

    No results matching ""