Components | All | New | MacOS | Windows | Linux | iOS | ||||
Examples | Mac & Win | Server | Client | Guides | Statistic | FMM | Blog | Deprecated | Old |
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