str_windows

Crates.iostr_windows
lib.rsstr_windows
version0.1.0
sourcesrc
created_at2018-06-02 13:06:16.953722
updated_at2018-06-02 13:06:16.953722
descriptionProvides an iterator over windows of chars (as `&str`s) of a `&str`.
homepage
repositoryhttps://github.com/derekdreery/str_windows-rs
max_upload_size
id68204
size15,637
Richard Dodd (derekdreery)

documentation

README

str_windows-rs

Provides an iterator over windows of chars (as &strs) of a &str.

Does not allocate on the heap.

Examples

use str_windows::str_windows;

let input = "s 😀😁";
let mut iter = str_windows(input, 3);
assert_eq!(iter.next(), Some("s 😀"));
assert_eq!(iter.next(), Some(" 😀😁"));
assert!(iter.next().is_none());
Commit count: 5

cargo fmt