1 unstable release
Uses old Rust 2015
0.1.0 | Jun 2, 2018 |
---|
#96 in #str
6KB
58 lines
str_windows-rs
Provides an iterator over windows of chars (as &str
s) 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());