normalie 0.1.0

Fast normalizers for tokie
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#[test]
fn collapse_then_metaspace_keeps_a_trailing_space_as_a_mark() {
    let mut scratch = normalie::Scratch::new();
    let out = scratch.apply3(
        "aa  bb ",
        true,
        |s, at, buf| {
            let _ = (s, at, buf);
            false
        },
        |s, at, buf| normalie::CollapseSpaces::write(s, at, buf),
        |s, at, buf| normalie::Metaspace::write(s, at, buf),
    );
    assert_eq!(out, "▁aa▁bb▁");
}