pub fn sentences<'a, E, E2>(
qty: impl TryInto<Repetition, Error = E>,
) -> Result<impl Pipe<&'a str, (Vec<&'a str>,), E2>, E>where
Incomplete: Into<E2>,Expand description
takes qty of sentences from an input
/// takes qty of words from an input
assert_eq!(
sentences::<_, Incomplete>(..2)
.unwrap()
.apply("Sentence 1. Sentence 2. Sentence 3. Sentence 4"),
Ok(("Sentence 3. Sentence 4", (vec!["Sentence 1. ", "Sentence 2. "],)))
);
assert_eq!(
sentences::<_, Incomplete>(..)
.unwrap()
.apply("Sentence 1. Sentence 2. Sentence 3. Sentence 4"),
Ok(("", (vec!["Sentence 1. ", "Sentence 2. ", "Sentence 3. ", "Sentence 4"],)))
);