pub fn concat<T, I>(elements: I) -> BString
Expand description
Concatenate the elements given by the iterator together into a single
BString
.
The elements may be any type that can be cheaply converted into an &[u8]
.
This includes, but is not limited to, &str
, &BStr
and &[u8]
itself.
ยงExamples
Basic usage:
use bstr;
let s = bstr::concat(&["foo", "bar", "baz"]);
assert_eq!(s, "foobarbaz");