LSet()

语法

Result$ = LSet(String$, Length [, Character$])
概要
Pads a string to the left by adding extra characters to fit the specified length.

参数

String$ The string to pad.
Length The total length (in characters) of the new string.
Character$ (optional) The character used to pad extra space in the new string. The default character is 'space'. 'Character$' has to be a one character length string.

返回值

A new string holding the original string padded with the specified character to fit the length.

Remarks

If the string is longer than the specified length, it will be truncated starting from the left side of the string.

示例

  Debug LSet("L", 8)          ; will display "L       "
  Debug LSet("L", 8, "-")     ; will display "L-------"
  Debug LSet("LongString", 4) ; will display "Long"

参阅

RSet(), LTrim(), RTrim()

已支持操作系统

所有

<- LCase() - String Index - LTrim() ->