truncate_persian_text
Shorten Persian text to a maximum length while preserving words, ZWNJ-joined terms, surrogate pairs, and diacritics, with optional word or character mode and custom ellipsis.
Instructions
Truncate text to maxLength (ellipsis included) without breaking words, ZWNJ-joined words, surrogate pairs or diacritics. mode 'word' (default) or 'char'.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | ||
| text | Yes | ||
| ellipsis | No | ||
| maxLength | Yes |