From 15370d2f54f9a6a286897715d74ffbf3bdf3e02e Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Fri, 4 Jun 2021 14:29:50 +0200 Subject: Make regex_replace_match_results() part of public API --- libbutl/regex.mxx | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'libbutl/regex.mxx') diff --git a/libbutl/regex.mxx b/libbutl/regex.mxx index b5490b1..b1ba1b9 100644 --- a/libbutl/regex.mxx +++ b/libbutl/regex.mxx @@ -95,6 +95,20 @@ LIBBUTL_MODEXPORT namespace butl const std::basic_regex&, const std::basic_string& fmt); + // As above but using match_results. + // + template + std::basic_string + regex_replace_match_results ( + const std::match_results::const_iterator>&, + const std::basic_string& fmt); + + template + std::basic_string + regex_replace_match_results ( + const std::match_results::const_iterator>&, + const C* fmt, std::size_t fmt_n); + // Parse the '///' replacement string into the regex/format // pair. Other character can be used as a delimiter instead of '/'. Throw // std::invalid_argument or std::regex_error on parsing error. -- cgit v1.1