語法
Text.PadStart(
text as nullable text,
count as number,
optional character as nullable text
) as nullable text
關於
藉由在文字值 text 的開頭插入空格,傳回填補至長度 count 的 text 值。 可以使用選擇性字元 character 來指定要用於填補的字元。 預設填補字元是空格。
範例 1
填補文字值的開頭,使其長度達到 10 個字元。
使用方式
Text.PadStart("Name", 10)
輸出
" Name"
範例 2
以 "|" 填補文字值的開頭,使其長度達到 10 個字元。
使用方式
Text.PadStart("Name", 10, "|")
輸出
"||||||Name"