Crates.io | chain_from_last |
lib.rs | chain_from_last |
version | 0.2.0 |
source | src |
created_at | 2024-11-15 10:46:48.415549 |
updated_at | 2024-11-15 11:07:19.270488 |
description | Iterator adaptor for chaining from last item. |
homepage | |
repository | https://github.com/yogevm15/chain_from_last |
max_upload_size | |
id | 1448985 |
size | 16,299 |
An iterator adaptor that chains the iterator with an iterator built from the last item.
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"]);