Skip to main content

Module stop_matcher

Module stop_matcher 

Source
Expand description

Streaming stop-sequence detection. Text is emitted as it arrives, except for a trailing suffix that could be the start of a stop sequence, which is held back until the next chunk resolves it.

Structs§

StopMatcher
A stop-sequence matcher fed text incrementally.

Functions§

stop_strings
Extract stop sequences from a parameter value: a single string, or an array of strings. Anything else yields no stops.