TRIM( ) function

Returns a new string containing a copy of the specified string with no trailing spaces.

Syntax

TRIM(string)

Parameters

string

Character. The value to remove trailing spaces from.

Output

Character.

Remarks

This function removes the trailing spaces from a string. Spaces inside the string are not removed.

TRIM( ) is related to the LTRIM( ) function, which removes any leading spaces from a string, and to the ALLTRIM( ) function, which removes both leading and trailing spaces.

Examples

Example Return value

TRIM("   Vancouver   ")

“   Vancouver”

TRIM("   New York")

“   New York”

Note that in both examples the leading spaces and spaces between words are not removed by the TRIM( ) function.

Related reference
ALLTRIM( ) function
LTRIM( ) function


(C) 2015 ACL Services Ltd. All Rights Reserved.