Trim

Removes leading and trailing spaces from a string.

Returns: string

Usage

Trim( string )

Arguments

Argument Description
string
(string, required)

the string to trim

Examples

// create variable with a string of text that has leading and trailing spaces
  foo = " Hello World!  ";
  // output variable
  writeDump("-" & foo & "-");
  // output variable without leading and trailing spaces
  writeDump("-" & Trim(foo) & "-");

See also