diff --git a/src/tools.rs b/src/tools.rs index 006a66a4..d7b80751 100644 --- a/src/tools.rs +++ b/src/tools.rs @@ -475,3 +475,15 @@ pub fn extract_auth_cookie(cookie: &str, cookie_name: &str) -> Option { None } + +pub fn join(data: &Vec, sep: char) -> String { + + let mut list = String::new(); + + for item in data { + if list.len() != 0 { list.push(sep); } + list.push_str(item); + } + + list +}