pub trait Splitter {
// Required methods
fn split(&self, input: &str) -> Vec<String>;
fn split_with_limit(
&self,
input: &str,
max_bytes_per_word: usize,
) -> Vec<Vec<u8>>;
}Required Methods§
Sourcefn split_with_limit(
&self,
input: &str,
max_bytes_per_word: usize,
) -> Vec<Vec<u8>>
fn split_with_limit( &self, input: &str, max_bytes_per_word: usize, ) -> Vec<Vec<u8>>
Splits a string into words and limits the size of each word to max_bytes. As this
function enforces a byte limit, it may split unicode characters. That is, this function
does not guarantee that the resulting byte arrays are valid UTF-8.