aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/messagebus/www/concat_strings.h
blob: bfaeab2c76ce00e1a608ba7277e6cdf8f21723f0 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma once 
 
#include <util/generic/string.h>
#include <util/stream/str.h> 
 
// ATTN: not equivalent to TString::Join - cat concat anything "outputable" to stream, not only TString convertable types.
 
inline void DoConcatStrings(TStringStream&) {
} 
 
template <class T, class... R>
inline void DoConcatStrings(TStringStream& ss, const T& t, const R&... r) {
    ss << t;
    DoConcatStrings(ss, r...);
} 
 
template <class... R>
inline TString ConcatStrings(const R&... r) {
    TStringStream ss; 
    DoConcatStrings(ss, r...);
    return ss.Str(); 
}