Documentation/Calc Functions/TRIM/en

Function name:
TRIM

Category:
Text

Summary:
Removes excess spaces from a supplied text string.

Syntax:
TRIM(Text)

Returns:
Returns a text string that is based on the supplied string, but with leading and trailing spaces removed and sequences of internal spaces replaced with a single space character.

Arguments:
Text is a text string (in quotation marks), or a reference to a cell containing a text string, that is the string from which spaces are to be removed.

Additional details:
TRIM removes space characters (Unicode U+0020) but does not remove other white-space characters such as horizontal tab (U+0009), line feed (U+000A) or carriage return (U+000D). In this respect the function is not fully compliant with ODF 1.2 but this behaviour is compatible with other major office suites.

Related LibreOffice functions:
None.

ODF standard:
Section 6.20.24, part 2.

Equivalent Excel functions:
TRIM