chadtmiller.com/knotless

Git hosted in your atproto account, on any stock PDS, fast enough for agents.

git clone knotless://chadtmiller.com/knotless

needs the knotless git helper. set it up

11 lines · 328 B Raw History
//! Splitting text into the things tally counts.

/// The words of `line`: runs of anything but whitespace.
pub fn words(line: &str) -> usize {
    line.split_whitespace().count()
}

/// The lines of `text`. A last line without a newline still counts.
pub fn lines(text: &str) -> impl Iterator<Item = &str> {
    text.lines()
}