fn at_next_cp_while<F>(cur: Cur<'_>, pred: F) -> Cur<'_>where
    F: FnMut(char) -> bool,