Shorten text
Cut a text to a maximum length and add an ending such as …, if you like at a word break, e.g. for subjects, columns or messages.
Command in the String toolkit · id ooa.string/shorten · 4 inputs (1 required), 2 outputs
Inputs
| Input | Type | Required | Default | What it is |
|---|---|---|---|---|
| Text | String | Yes | Text to shorten. | |
| Maximum length | Number | No | 100 | Longest result, ending included. |
| Ending | String | No | … | Added when the text is cut; empty adds nothing. |
| Whole words | Boolean | No | true | Cut at the last space rather than in a word. |
Outputs
| Output | Type | What it is |
|---|---|---|
| result | String | The shortened text (unchanged when it was short enough). |
| shortened | Boolean | True when the text was cut. |