Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.1
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
Statistic
FMM
Blog
Trims whitespace on the left and right side.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Text | 8.2 | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
Parameter | Description | Example |
---|---|---|
Text | The text to trim. | " Hello " |
Returns OK or error.
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
)
This function is free to use.
Created 30th April 2018, last changed 28th March 2023