Skip to content

Text length (text_length)

What it does: Returns the number of characters in the input text.

text_length

Inputs

  • VALUE: text (and field, if applicable).

Output

  • number (number of characters).

When to use it

  • Checking the minimum or maximum input length.
  • Validation of commands, tokens or data received after communication.

Tips and pitfalls

  • Empty text has length 0.
  • Visibly the number of characters can vary for some special Unicode symbols.
  • If you are working with received data, it is often advisable to use text_trim beforehand.