Thrill  0.1
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 <[email protected]>
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 
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::basic_string< char, std::char_traits< char >, Allocator< char > > string
string with Manager tracking
Definition: allocator.hpp:220
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