Trim

From NSB App Studio
Revision as of 15:37, 25 March 2019 by Ghenne (talk | contribs) (→‎Related Items)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Trim(string)

Description

Trim returns a string with all leading and trailing spaces removed. The required parameter, string, is any valid string expression.

Example (Basic)

Rem Trim Example
'Trim trims leading and trailing spaces
Dim Spacey
Spacey = " K "
Print "(" & Spacey & ")"
Print "(" & Trim(Spacey) & ")"

Example (Basic)

// Trim Example
/* Trim trims leading and trailing spaces */

var Spacey;
Spacey = " K ";
NSB.Print("(" + Spacey + ")");
NSB.Print("(" + Spacey.trim() + ")");

Output

( K )
(K)

Related Items

LTrim, RTrim