Skip to content

Trim spaces (trim) (text_trim)

What it does: Remove whitespace at the beginning and/or end of text.

text_trim

Inputs

  • TEXT: the text you want to clear.
  • Setting block MODE: LEFT, RIGHT, BOTH.

Output

  • Text (truncated string).

When to use it

  • cleaning data from UART/HTTP/file.
  • Normalize input before comparing or parsing.

Tips and pitfalls

  • Trims start/end, not spaces inside text.
  • BOTH is the most common choice for general inlet cleaning.
  • Use before text_isEmpty if you want to ignore spaces themselves.