diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-06-04 14:29:50 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-06-04 14:29:50 +0200 |
commit | 15370d2f54f9a6a286897715d74ffbf3bdf3e02e (patch) | |
tree | 7de4bde64ff69b40af604217dfafff9d992df77d /libbutl/regex.ixx | |
parent | 6730152baa777fa04d7c494fa4fb53552f65c703 (diff) |
Make regex_replace_match_results() part of public API
Diffstat (limited to 'libbutl/regex.ixx')
-rw-r--r-- | libbutl/regex.ixx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/libbutl/regex.ixx b/libbutl/regex.ixx index 805acd1..f55cb07 100644 --- a/libbutl/regex.ixx +++ b/libbutl/regex.ixx @@ -38,4 +38,13 @@ LIBBUTL_MODEXPORT namespace butl //@@ MOD Clang needs this for some reason. return regex_replace_parse ( s, std::basic_string<C>::traits_type::length (s), f); } + + template <typename C> + inline std::basic_string<C> + regex_replace_match_results ( + const std::match_results<typename std::basic_string<C>::const_iterator>& m, + const std::basic_string<C>& fmt) + { + return regex_replace_match_results (m, fmt.c_str (), fmt.size ()); + } } |