chain_from_last

Crates.iochain_from_last
lib.rschain_from_last
version0.2.0
sourcesrc
created_at2024-11-15 10:46:48.415549
updated_at2024-11-15 11:07:19.270488
descriptionIterator adaptor for chaining from last item.
homepage
repositoryhttps://github.com/yogevm15/chain_from_last
max_upload_size
id1448985
size16,299
(yogevm15)

documentation

https://docs.rs/chain_from_last/

README

Chain from last

An iterator adaptor that chains the iterator with an iterator built from the last item.

Example

use chain_from_last::ChainFromLastExt;

let words: Vec<_> = "lorem ipsum dolor;sit;amet"
    .split(" ")
    .chain_from_last(|l| l.split(";"))
    .collect();

assert_eq!(words, vec!["lorem", "ipsum", "dolor", "sit", "amet"]);
Commit count: 3

cargo fmt