Skip to content

Trim - Built-in String Function

Purpose

Trim returns a string with leading and trailing spaces removed.

Syntax

Trim(str)

Arguments

Argument Required Description
str Yes Any valid string expression from which the leading and trailing spaces will be removed

Returns

String

Example

Let sTest = "    Hello World    "
Return Trim(sTest) // returns "Hello World"

See Also

Notes

  • When str cannot be converted to a string, a runtime error is generated.