MySQL 8.4.0
Source Code Documentation
string_template_utils.h File Reference
#include <cstring>
#include <string>

Go to the source code of this file.

Functions

static size_t length_of_string (const std::string &s)
 
static size_t length_of_string (const char *s)
 
template<typename S >
size_t sum_sizeof_strings (S s)
 
template<typename H , typename... T>
size_t sum_sizeof_strings (H head, T... tail)
 
template<typename S >
void concatenate_acc (std::string *acc, S s)
 
template<typename H , typename... T>
void concatenate_acc (std::string *acc, H head, T... tail)
 
template<typename... S>
std::string concatenate (S... s)
 Concatenate a list of std::string or '\0'-terminated strings. More...
 

Function Documentation

◆ concatenate()

template<typename... S>
std::string concatenate ( S...  s)

Concatenate a list of std::string or '\0'-terminated strings.

Note
throws std::bad_alloc
Parameters
sList of std::string or '\0'-terminated strings
Returns
concatenated string

◆ concatenate_acc() [1/2]

template<typename H , typename... T>
void concatenate_acc ( std::string *  acc,
head,
T...  tail 
)

◆ concatenate_acc() [2/2]

template<typename S >
void concatenate_acc ( std::string *  acc,
s 
)

◆ length_of_string() [1/2]

static size_t length_of_string ( const char *  s)
inlinestatic

◆ length_of_string() [2/2]

static size_t length_of_string ( const std::string &  s)
inlinestatic

◆ sum_sizeof_strings() [1/2]

template<typename H , typename... T>
size_t sum_sizeof_strings ( head,
T...  tail 
)

◆ sum_sizeof_strings() [2/2]

template<typename S >
size_t sum_sizeof_strings ( s)