[][src]Trait osstrtools::OsStrConcat

pub trait OsStrConcat {
    fn concat(self, sep: impl Bytes) -> OsString;
}

Concatenation of things that can be turned into an Iterator of elements that implement Bytes.

Required methods

fn concat(self, sep: impl Bytes) -> OsString

Concatenates all the strings and places the separator between all elements. The separator can be an empty string.

Examples

use std::ffi::OsStr;
use osstrtools::OsStrConcat;

let strings: &[&OsStr] = &[OsStr::new("a"),
                           OsStr::new("b"),
                           OsStr::new("c")];
let result = strings.concat(" ");

assert_eq!(result, "a b c");
Loading content...

Implementors

impl<I> OsStrConcat for I where
    I: IntoIterator,
    I::Item: Bytes + Clone
[src]

Loading content...