Function yz_string_utils::split_at_while[][src]

pub fn split_at_while(x: &[u8], f: impl FnMut(&u8) -> bool) -> (&[u8], &[u8])
Expand description

Splits a slice at the first point after which f returns false. Usually used to segment input according to character categories.

e.g. 1. part while f(x) == true, then 2. part