RSET$ function

Purpose

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

Syntax

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

Remarks

RSET$ right-aligns the string string_expression into a string of strlen& characters.

USING

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

If string_expression is shorter then strlen&, RSET$ right-justifies string_expression within the assigned string variable (a$), padding the left side as described above; otherwise, RSET$ returns the left-most strlen& bytes of string_expression.

See also

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

Example

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

' result: "          PowerBASIC"

 

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

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