trim()

Examples


The trim() function removes trailing blanks from a specified string. It can also be used to remove a specified string from the beginning, end or both the beginning and end of another specified string.

Syntax

trim(string {, direction, trimstring})

Parameters

string – A string field or string value from which to remove blanks or a specified string.

direction – A constant that specifies where the trimstring should be removed from the string. The possible values for the parameter are:

[spacer]

Constant

Description

LEADING

Remove trimstring from the start of string.

TRAILING

Remove trimstring from the end of string.

LEADING+TRAILING

Remove trimstring from the beginning and end of string.


trimstring – A string field or value to be removed from string.

If the trimstring and direction parameters aren’t specified, spaces will be trimmed from both the beginning and the end of the string.


Return value

String


Documentation Feedback