PATH:
opt
/
cpanel
/
ea-ruby27
/
src
/
passenger-release-6.1.2
/
src
/
cxx_supportlib
/
vendor-modified
/
boost
/
regex
/
v5
/* * * Copyright (c) 1998-2009 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE regex_format.hpp * VERSION see <boost/version.hpp> * DESCRIPTION: Provides formatting output routines for search and replace * operations. Note this is an internal header file included * by regex.hpp, do not include on its own. */ #ifndef BOOST_REGEX_V5_REGEX_REPLACE_HPP #define BOOST_REGEX_V5_REGEX_REPLACE_HPP #include <boost/regex/v5/basic_regex.hpp> #include <boost/regex/v5/match_flags.hpp> #include <boost/regex/v5/regex_iterator.hpp> namespace boost{ BOOST_REGEX_MODULE_EXPORT template <class OutputIterator, class BidirectionalIterator, class traits, class charT, class Formatter> OutputIterator regex_replace(OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, const basic_regex<charT, traits>& e, Formatter fmt, match_flag_type flags = match_default) { regex_iterator<BidirectionalIterator, charT, traits> i(first, last, e, flags); regex_iterator<BidirectionalIterator, charT, traits> j; if(i == j) { if(!(flags & regex_constants::format_no_copy)) out = BOOST_REGEX_DETAIL_NS::copy(first, last, out); } else { BidirectionalIterator last_m(first); while(i != j) { if(!(flags & regex_constants::format_no_copy)) out = BOOST_REGEX_DETAIL_NS::copy(i->prefix().first, i->prefix().second, out); out = i->format(out, fmt, flags, e); last_m = (*i)[0].second; if(flags & regex_constants::format_first_only) break; ++i; } if(!(flags & regex_constants::format_no_copy)) out = BOOST_REGEX_DETAIL_NS::copy(last_m, last, out); } return out; } BOOST_REGEX_MODULE_EXPORT template <class traits, class charT, class Formatter> std::basic_string<charT> regex_replace(const std::basic_string<charT>& s, const basic_regex<charT, traits>& e, Formatter fmt, match_flag_type flags = match_default) { std::basic_string<charT> result; BOOST_REGEX_DETAIL_NS::string_out_iterator<std::basic_string<charT> > i(result); regex_replace(i, s.begin(), s.end(), e, fmt, flags); return result; } } // namespace boost #endif // BOOST_REGEX_V5_REGEX_REPLACE_HPP
[-] match_flags.hpp
[edit]
[-] match_results.hpp
[edit]
[-] syntax_type.hpp
[edit]
[-] regex_match.hpp
[edit]
[-] cpp_regex_traits.hpp
[edit]
[-] iterator_category.hpp
[edit]
[-] error_type.hpp
[edit]
[-] perl_matcher_non_recursive.hpp
[edit]
[-] icu.hpp
[edit]
[-] regex_merge.hpp
[edit]
[-] unicode_iterator.hpp
[edit]
[-] regex_split.hpp
[edit]
[-] regex_grep.hpp
[edit]
[-] pattern_except.hpp
[edit]
[-] u32regex_token_iterator.hpp
[edit]
[-] regex_fwd.hpp
[edit]
[-] basic_regex.hpp
[edit]
[-] perl_matcher.hpp
[edit]
[-] perl_matcher_common.hpp
[edit]
[-] mem_block_cache.hpp
[edit]
[-] regex_iterator.hpp
[edit]
[+]
..
[-] basic_regex_creator.hpp
[edit]
[-] regex_traits_defaults.hpp
[edit]
[-] char_regex_traits.hpp
[edit]
[-] object_cache.hpp
[edit]
[-] regex_search.hpp
[edit]
[-] sub_match.hpp
[edit]
[-] regex_format.hpp
[edit]
[-] c_regex_traits.hpp
[edit]
[-] iterator_traits.hpp
[edit]
[-] regex_replace.hpp
[edit]
[-] regex_raw_buffer.hpp
[edit]
[-] basic_regex_parser.hpp
[edit]
[-] regbase.hpp
[edit]
[-] regex_traits.hpp
[edit]
[-] regex.hpp
[edit]
[-] regex_workaround.hpp
[edit]
[-] regex_token_iterator.hpp
[edit]
[-] states.hpp
[edit]
[-] primary_transform.hpp
[edit]
[-] w32_regex_traits.hpp
[edit]
[-] cregex.hpp
[edit]
[-] u32regex_iterator.hpp
[edit]