Function shlex::bytes::try_join

source ·
pub fn try_join<'a, I: IntoIterator<Item = &'a [u8]>>(
    words: I
) -> Result<Vec<u8>, QuoteError>
Expand description

Convenience function that consumes an iterable of words and turns it into a single byte 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 string equivalent is shlex::try_join.