tlx
join.cpp
Go to the documentation of this file.
1 /*******************************************************************************
2  * tlx/string/join.cpp
3  *
4  * Part of tlx - http://panthema.net/tlx
5  *
6  * Copyright (C) 2007-2017 Timo Bingmann <tb@panthema.net>
7  *
8  * All rights reserved. Published under the Boost Software License, Version 1.0
9  ******************************************************************************/
10 
11 #include <tlx/string/join.hpp>
13 
14 namespace tlx {
15 
16 std::string join(char glue, const std::vector<std::string>& parts) {
17  return join(glue, parts.begin(), parts.end());
18 }
19 
20 std::string join(const char* glue, const std::vector<std::string>& parts) {
21  return join(glue, parts.begin(), parts.end());
22 }
23 
24 std::string join(
25  const std::string& glue, const std::vector<std::string>& parts) {
26  return join(glue, parts.begin(), parts.end());
27 }
28 
29 } // namespace tlx
30 
31 /******************************************************************************/
std::string join(char glue, const std::vector< std::string > &parts)
Join a vector of strings by some glue character between each pair from the sequence.
Definition: join.cpp:16