Skip to main content

This is documentation for Caché & Ensemble.

For information on converting to InterSystems IRIS, see the InterSystems IRIS Adoption Guide and the InterSystems IRIS In-Place Conversion Guide, both available on the WRC Distributions page (login required).

Previous sectionNext section

TRIMFS

Removes leading blanks from each element of a dynamic array.

Synopsis

TRIMFS(dynarray)

Arguments

dynarray An expression that resolves to a dynamic array.

Description

The TRIMFS function trims leading blank spaces from each element of a dynamic array. It returns the resulting trimmed dynamic array.

TRIMFS does not trim trailing blank spaces from dynamic array elements. You can use the TRIMBS function to remove trailing blank spaces from each element of a dynamic array. You can use TRIMS to remove leading, trailing, and multiple embedded blank spaces from all of the elements of a dynamic array.

You can use TRIM to remove both leading and trailing blanks from a string. You can use TRIMF to remove leading blanks from a string. You can use TRIMB to remove trailing blanks from a string.

Examples

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

RawDyn="   North":@VM:"      South":@VM:"East":@VM:"  West.."
PRINT LENS(RawDyn)
TrimDyn = TRIMFS(RawDyn)
PRINT LENS(TrimDyn)
Copy code to clipboard

See Also