Components All New MacOS Windows Linux iOS
Examples Mac & Win Server Client Guides Statistic FMM Blog Deprecated Old

Text.Trim

Trims whitespace on the left and right side.

Component Version macOS Windows Linux Server iOS SDK
Text 8.2 ✅ Yes ✅ Yes ✅ Yes ✅ Yes ✅ Yes
MBS( "Text.Trim"; Text )   More

Parameters

Parameter Description Example
Text The text to trim. " Hello "

Result

Returns OK or error.

Description

Trims whitespace on the left and right side.
May remove low ASCII characters like tab, CR, LF and space.

This function works on pure text, so any text style is lost.

Examples

Trim hello:

MBS( "Text.Trim"; " ¶ Hello ¶ ")

Example result: Hello

Trim emojis:

MBS( "Text.Trim"; " 🍎 🍓 🍒 ")

Example result: 🍎 🍓 🍒

Remove some invisble characters:

Substitute("Hello";
[Char(173);""]; // 00AD soft hyphen
[Char(8203);""]; // 200B zero width space
[Char(8204);""]; // 200C zero width non-joiner
[Char(8205);""]; // 200D zero width joiner
[Char(8239);" "]; // 202F narrow no-break space
[Char(8287);" "]; // 205F medium mathematical space
[Char(8288);""]; // 2060 word joiner
[Char(8289);""]; // 2061 function application
[Char(8290);""]; // 2061 invisible times
[Char(8291);""]; // 2062 invisible separator
[Char(8292);""]; // 2063 invisible plus
[Char(65279);""] // FEFF zero width space
)

Release notes

Example Databases

Blog Entries

This function is free to use.

Created 30th April 2018, last changed 28th March 2023


Text.TextToRTF - Text.UpperCase