LSET$ function

Purpose

Return a string containing a left-justified (padded) string.

Syntax

a$ = LSET$(string_expression, strlen& [USING ustring_expression])

Remarks

LSET$ left-aligns the string string_expression into a string of strlen& characters.

USING

If ustring_expression is null (empty) or is not specified, LSET$ pads string_expression with space characters.  Otherwise, LSET$ pads the string with the first character of ustring_expression.

If string_expression is shorter then strlen&, LSET$ left-justifies string_expression within result_var, padding the right side as described above; otherwise, LSET$ returns the left-most strlen& bytes of string_expression.

See also

CSET, CSET$, GET, LET, LSET, PUT, RESET, RSET, RSET$, STRINSERT$, TYPE SET

Example

a$ = LSET$("PowerBASIC", 20)

' result: "PowerBASIC          "

 

a$ = LSET$("PowerBASIC",20 USING "*")

' result: "PowerBASIC**********"