pub fn try_join<'a, I: IntoIterator<Item = &'a str>>(
words: I,
) -> Result<String, QuoteError>
Expand description
Convenience function that consumes an iterable of words and turns it into a single string, quoting words when necessary. Consecutive words will be separated by a single space.
Uses default settings. The only error that can be returned is QuoteError::Nul
.
Equivalent to Quoter::new().join(words)
.
The bytes equivalent is bytes::try_join.