📏
Text Length
base.text.lengthBase SetUtilityReturns how many characters are in a piece of text. Useful for validating message length, word-count style games, or limits before sending.
On the canvas
This is what Text Length looks like when you place it on your flow. Each field below is something you configure in the inspector panel.
📏Utility
Text Length
base.text.lengthtextrequired
{{message.content}}
asrequired
length
Config fields
| Field | Type | Req | What it does |
|---|---|---|---|
text{{message.content}} | text | yes | Text 📝 |
aslength | text | yes | Save count as ✨ |
Sparks this piece adds
After this piece runs, these values are available as sparks in every node downstream.
{{length}}numberCharacter countOutput ports
outputNumber spark with the length
📐
In TypeScript, this would be…
Not something you need to write — just a look at what Kitcord does for you.
TypeScript
const length = text.length;
// {{length}} — character countMore Utility pieces