23#ifndef GUL17_JOIN_SPLIT_H_ 
   24#define GUL17_JOIN_SPLIT_H_ 
  121template <
typename StringContainer = std::vector<std::
string>,
 
  122          typename ContainerInsertFct = 
void (*)(StringContainer&, std::
string_view)>
 
  127    using StringType = 
typename StringContainer::value_type;
 
  128    using SizeType = 
typename StringType::size_type;
 
  136        if (
hit == StringType::npos)
 
 
  172template <
typename StringContainer = std::vector<std::
string>,
 
  173          typename ContainerInsertFct = 
void (*)(StringContainer&, std::
string_view)>
 
  178    auto const end = std::cregex_iterator{ };
 
  188        auto previous = std::cregex_iterator{ };
 
 
  226template <
typename StringContainer = std::vector<std::
string_view>,
 
  227          typename ContainerInsertFct = 
void (*)(StringContainer&, std::
string_view)>
 
  238template <
typename, 
typename = 
void>
 
  239struct HasSize : std::false_type
 
  243struct HasSize<
T, std::
void_t<decltype(std::declval<const T&>().size())>> : std::true_type
 
  282template <
typename Iterator>
 
  284join(Iterator begin, Iterator end, std::string_view 
glue)
 
  292    if constexpr (detail::HasSize<ElementType>::value)
 
  297        for (
auto it = begin; 
it != end; ++
it)
 
  310    for (
auto it = std::next(begin); 
it != end; ++
it)
 
 
  358template <
typename StringContainer>
 
  397template <
typename Iterator, 
typename ConversionFct>
 
  402    static_assert(std::is_invocable_v<
ConversionFct, 
decltype(*begin)>,
 
  403                  "ConversionFct does not accept the element type of the range");
 
  414    for (
auto it = std::next(begin); 
it != end; ++
it)
 
 
  453template <
typename Container, 
typename ConversionFct>
 
auto constexpr bit_set(unsigned bit) noexcept -> ReturnT
Set a bit in an integral type.
Definition bit_manip.h:121
 
StringContainer split_sv(std::string_view text, std::string_view delimiter, ContainerInsertFct insert_fct=detail::emplace_back< StringContainer >)
Separate a string at all occurrences of a delimiter, returning the strings between the delimiters in ...
Definition join_split.h:229
 
std::string join(Iterator begin, Iterator end, std::string_view glue)
Concatenate all strings (or string-like elements) in a range, placing a delimiter between them.
Definition join_split.h:284
 
StringContainer split(std::string_view text, std::string_view delimiter, ContainerInsertFct insert_fct=detail::emplace_back< StringContainer >)
Separate a string at all occurrences of a delimiter, returning the strings between the delimiters in ...
Definition join_split.h:124
 
Definition of macros used internally by GUL.
 
Namespace gul17 contains all functions and classes of the General Utility Library.
Definition doxygen.h:26
 
Declaration of string utility functions.