Expand description
Text clipping utility for HTML and plain text.
LLM-assisted port of https://github.com/arendjr/text-clipper
Structs§
- Clip
Html Options - Options for clipping HTML (html = true).
- Clip
Plain Text Options - Options for clipping plain text (html = false).
- Common
Clip Options - Common options shared by both plain-text and HTML clipping.
Enums§
- Clip
Options - Discriminated union of allowed clip options.
- Strip
Tags - Represents either an explicit list of tags or the boolean
truemeaning “strip all tags”.
Functions§
- clip
- Clips a string to a maximum length (in UTF-16 code units), optionally preserving valid HTML when clipping HTML input.
- html_
options - plain_
options - truncate_
html - truncate_
text