Skip to main content

tokenize_predicate

Function tokenize_predicate 

Source
pub fn tokenize_predicate<F: Fn(char) -> bool>(
    text: &str,
    predicate: F,
) -> Vec<&str>
Expand description

Tokenize by splitting on any character matching a predicate.

Consecutive delimiters produce empty tokens (like str::split).