#[cfg(not(feature = "std"))]
use alloc::vec::Vec;
#[cfg(not(feature = "std"))]
use alloc::string::String;
use core::borrow::Borrow;
pub fn concat<T: Clone, V: Borrow<[T]>>(vecs: &[V]) -> Vec<T> {
let size = vecs.iter().map(|slice| slice.borrow().len()).sum();
let mut result = Vec::with_capacity(size);
for v in vecs {
result.extend_from_slice(v.borrow())
}
result
}
pub fn join<S: Borrow<str>>(sep: &str, strings: &[S]) -> String {
let mut builder = String::new();
for s in strings {
if !builder.is_empty() {
builder += sep;
}
builder += s.borrow();
}
builder
}