LTrim, RTrim and Trim Function

Action

Removes spaces at the beginning and/or end of a string expression.

Syntax

Trim[$](x$)

LTrim[$](x$)

RTrim[$](x$)

x$: svar

Description

With the function LTrim() you can remove empty spaces from the beginning string, with RTrim from the end and with Trim from both sides.

Example

OpenW 1 : Color , RGB(220, 220, 220)

Local a$ = " GFA", b$ = " Software ", x%

Print a$ + b$

Print LTrim(a$) + RTrim(b$)

Print Trim(a$ & b$)

Remarks

See Also

ZTrim

{Created by Sjouke Hamstra; Last updated: 20/11/2023 by James Gaite; Other Contributors: Jean-Marie Melanson}