Rabbinatix
Sign inGet started
Store

Truncate with ellipsis

FreeLogic
@rabbinatix/truncate-with-ellipsis by Rabbinatixupdated Oct 4, 2026

Shortens text to a maximum length, ending in `…` when it was cut.

Sign in to add

Give it the text and the max length (the … counts). Short text comes back unchanged.

Shows: Branch (IF / ELSE) with a Return on each side, String Length, Greater Than, Substring, Concat.

How to use it

Add it to your logic, then add a Call Function step in any logic and pick Truncate. It belongs to no system, so every system can use it. Or download the TypeScript and call it from your own code.

Inputs
text: Text
max: Whole number
Outputs
result: Text
truncated: Yes / No
Previewdrag the steps around; scroll to zoom
Function Entry, Input / output. 0 inputs, 3 outputs. step 1 of 9
Truncate
text
max
String Length, String. 1 input, 1 output. step 2 of 9
String Length
text
length
Greater Than, Operators. 2 inputs, 1 output. step 3 of 9
>
A
B
result
Branch, Flow control. 2 inputs, 2 outputs. step 4 of 9
Branch
condition
True
False
Subtract, Operators. 2 inputs, 1 output. step 5 of 9
-
A
B
result
Substring, String. 3 inputs, 1 output. step 6 of 9
Substring
text
start
end
result
Concat, String. 2 inputs, 1 output. step 7 of 9
Concat
a
b
result
Return, Input / output. 3 inputs, 0 outputs. step 8 of 9
Return
result
truncated
Return, Input / output. 3 inputs, 0 outputs. step 9 of 9
Return
result
truncated

Arrow keys: next or previous step in flow order. Alt with arrows: nearest step in that direction. Enter: open. Shift F10: more actions.

100%
Examplesrun live against the logic · 2/2 pass
PassedExampleInputOutput
Too long{"text":"Hello world","max":8}{"result":"Hello w…","truncated":true}
Fits{"text":"Short","max":10}{"result":"Short","truncated":false}
Try it
Versions
In this package
Truncate (entry)