TRIMF()

TRIMF(), TRIMFS()

Top  Previous  Next

 

The TRIMF() function removes excess spaces from the front of a string. The TRIMFS() function is similar to TRIMF() but operates on each element of a dynamic array and returns an equivalently structured dynamic array of trimmed strings.

 

 

Format

 

TRIMF(string)

 

where

 

stringevaluates to the string to be trimmed.

 

 

The TRIMF() function removes all leading spaces from string.

 

Where string is delimited by mark characters, the TRIMF() function works on each delimited substring as a separate item.

 

 

 

Examples

 

A = "  1  2  3  "

B = TRIMF(A)

 

This program fragment removes excess spaces from string A setting B to "1  2  3  "

 

 

A = "  1  2  3  " : @FM : "  4  5  6"

B = TRIMFS(A)

 

This program fragment is similar to the previous example but it shows the way in which TRIMFS() operates on the two fields separately.

B becomes "1  2  3 FM4  5  6  "

 

 

See also:

TRIM(), TRIMB(), TRIMS(), TRIMW()