Skip to main content

TRIMF

Removes leading blanks from a string.

Synopsis

TRIMF(string)

Arguments

string An expression that resolves to a string.

Description

The TRIMF function trims blank spaces from the front end of a string (leading blanks). It returns the resulting trimmed string.

You can use the TRIM function to remove blank spaces (or other repetitive characters) from both ends of a string. You can use the TRIMB function to remove blank spaces from the back end of a string (trailing blanks).

You can use the TRIMFS and TRIMBS functions to remove leading or trailing blanks from the elements of a dynamic array.

Examples

The following example uses the TRIMF function to trim leading spaces:

MyVar = TRIMF("  Caché  ")
        ! MyVar contains "  Caché".
PRINT LEN(MyVar),"[":MyVar:"]"

See Also

FeedbackOpens in a new tab