Skip to main content
Version: I2023.3.0

TRIM | LTRIM | RTRIM

The TRIM function removes both leading and trailing spaces from the specified string. LTRIM removes just leading spaces, and RTRIM removes just trailing spaces.

Syntax

TRIM | LTRIM | RTRIM(string_expression)

Return Value

Returns a string value without leading and/or trailing spaces.

Input Parameters

string_expression
Required. A dimension attribute or expression that returns a string value.

Examples

TRIM(" hello world ") returns "hello world"

LTRIM(" hello world ") returns "hello world "

RTRIM(" hello world ") returns " hello world"