Skip to main content

StringSplitter

Type Alias StringSplitter 

Source
pub type StringSplitter = Rc<dyn Fn(&str) -> Vec<String>>;
Expand description

Function used to split a string into editable units.

The default splitter is Unicode scalar-value based (text.chars()), which is the closest Rust equivalent to JavaScript’s [...text]. For grapheme-aware animation, pass a splitter backed by a crate such as unicode-segmentation.

Aliased Type§

pub struct StringSplitter { /* private fields */ }