header_utils
Loading...
Searching...
No Matches
ghassanpl::regex Namespace Reference

Typedefs

using svmatch = std::match_results< std::string_view::const_iterator >
 Shamelessly stolen from https://stackoverflow.com/a/37516316.
 

Functions

template<class BidirIt , class UnaryFunction >
std::string regex_replace (BidirIt &&first, BidirIt &&last, const std::regex &re, UnaryFunction &&f)
 
template<class UnaryFunction >
std::string regex_replace (std::string_view s, const std::regex &re, UnaryFunction &&f)
 
template<class BidirIt , class UnaryFunction >
void regex_split (BidirIt first, BidirIt last, const std::regex &re, UnaryFunction &&f)
 
template<class UnaryFunction >
void regex_split (std::string_view s, const std::regex &re, UnaryFunction &&f)
 
std::vector< std::string > regex_split (std::string_view s, const std::regex &re)
 

Detailed Description

Typedef Documentation

◆ svmatch

using ghassanpl::regex::svmatch = typedef std::match_results<std::string_view::const_iterator>

Shamelessly stolen from https://stackoverflow.com/a/37516316.

Definition at line 13 of file regex.h.

Function Documentation

◆ regex_replace() [1/2]

std::string ghassanpl::regex::regex_replace ( BidirIt &&  first,
BidirIt &&  last,
const std::regex &  re,
UnaryFunction &&  f 
)

Definition at line 16 of file regex.h.

◆ regex_replace() [2/2]

template<class UnaryFunction >
std::string ghassanpl::regex::regex_replace ( std::string_view  s,
const std::regex &  re,
UnaryFunction &&  f 
)

Definition at line 50 of file regex.h.

◆ regex_split() [1/3]

void ghassanpl::regex::regex_split ( BidirIt  first,
BidirIt  last,
const std::regex &  re,
UnaryFunction &&  f 
)

Definition at line 56 of file regex.h.

◆ regex_split() [2/3]

std::vector< std::string > ghassanpl::regex::regex_split ( std::string_view  s,
const std::regex &  re 
)
inline

Definition at line 70 of file regex.h.

◆ regex_split() [3/3]

template<class UnaryFunction >
void ghassanpl::regex::regex_split ( std::string_view  s,
const std::regex &  re,
UnaryFunction &&  f 
)

Definition at line 65 of file regex.h.