Skip to content

Iterator over windows of chars (as `&str`) in a `&str`.

License

MIT, Apache-2.0 licenses found

Licenses found

MIT
LICENSE
Apache-2.0
LICENSE-APACHE-2
Notifications You must be signed in to change notification settings

richard-uk1/str_windows-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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());

About

Iterator over windows of chars (as `&str`) in a `&str`.

Resources

License

MIT, Apache-2.0 licenses found

Licenses found

MIT
LICENSE
Apache-2.0
LICENSE-APACHE-2

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages