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