Module text_clipper

Module text_clipper 

Source
Expand description

Text clipping utility for HTML and plain text.

LLM-assisted port of https://github.com/arendjr/text-clipper

Structs§

ClipHtmlOptions
Options for clipping HTML (html = true).
ClipPlainTextOptions
Options for clipping plain text (html = false).
CommonClipOptions
Common options shared by both plain-text and HTML clipping.

Enums§

ClipOptions
Discriminated union of allowed clip options.
StripTags
Represents either an explicit list of tags or the boolean true meaning “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