Chris@16
|
1 /*
|
Chris@16
|
2 *
|
Chris@16
|
3 * Copyright (c) 1998-2002
|
Chris@16
|
4 * John Maddock
|
Chris@16
|
5 *
|
Chris@16
|
6 * Use, modification and distribution are subject to the
|
Chris@16
|
7 * Boost Software License, Version 1.0. (See accompanying file
|
Chris@16
|
8 * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
|
Chris@16
|
9 *
|
Chris@16
|
10 */
|
Chris@16
|
11
|
Chris@16
|
12 /*
|
Chris@16
|
13 * LOCATION: see http://www.boost.org for most recent version.
|
Chris@16
|
14 * FILE regex_format.hpp
|
Chris@16
|
15 * VERSION see <boost/version.hpp>
|
Chris@16
|
16 * DESCRIPTION: Provides formatting output routines for search and replace
|
Chris@16
|
17 * operations. Note this is an internal header file included
|
Chris@16
|
18 * by regex.hpp, do not include on its own.
|
Chris@16
|
19 */
|
Chris@16
|
20
|
Chris@16
|
21 #ifndef BOOST_REGEX_V4_REGEX_MERGE_HPP
|
Chris@16
|
22 #define BOOST_REGEX_V4_REGEX_MERGE_HPP
|
Chris@16
|
23
|
Chris@16
|
24
|
Chris@16
|
25 namespace boost{
|
Chris@16
|
26
|
Chris@16
|
27 #ifdef BOOST_MSVC
|
Chris@16
|
28 #pragma warning(push)
|
Chris@16
|
29 #pragma warning(disable: 4103)
|
Chris@16
|
30 #endif
|
Chris@16
|
31 #ifdef BOOST_HAS_ABI_HEADERS
|
Chris@16
|
32 # include BOOST_ABI_PREFIX
|
Chris@16
|
33 #endif
|
Chris@16
|
34 #ifdef BOOST_MSVC
|
Chris@16
|
35 #pragma warning(pop)
|
Chris@16
|
36 #endif
|
Chris@16
|
37
|
Chris@16
|
38 template <class OutputIterator, class Iterator, class traits, class charT>
|
Chris@16
|
39 inline OutputIterator regex_merge(OutputIterator out,
|
Chris@16
|
40 Iterator first,
|
Chris@16
|
41 Iterator last,
|
Chris@16
|
42 const basic_regex<charT, traits>& e,
|
Chris@16
|
43 const charT* fmt,
|
Chris@16
|
44 match_flag_type flags = match_default)
|
Chris@16
|
45 {
|
Chris@16
|
46 return regex_replace(out, first, last, e, fmt, flags);
|
Chris@16
|
47 }
|
Chris@16
|
48
|
Chris@16
|
49 template <class OutputIterator, class Iterator, class traits, class charT>
|
Chris@16
|
50 inline OutputIterator regex_merge(OutputIterator out,
|
Chris@16
|
51 Iterator first,
|
Chris@16
|
52 Iterator last,
|
Chris@16
|
53 const basic_regex<charT, traits>& e,
|
Chris@16
|
54 const std::basic_string<charT>& fmt,
|
Chris@16
|
55 match_flag_type flags = match_default)
|
Chris@16
|
56 {
|
Chris@16
|
57 return regex_merge(out, first, last, e, fmt.c_str(), flags);
|
Chris@16
|
58 }
|
Chris@16
|
59
|
Chris@16
|
60 template <class traits, class charT>
|
Chris@16
|
61 inline std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
|
Chris@16
|
62 const basic_regex<charT, traits>& e,
|
Chris@16
|
63 const charT* fmt,
|
Chris@16
|
64 match_flag_type flags = match_default)
|
Chris@16
|
65 {
|
Chris@16
|
66 return regex_replace(s, e, fmt, flags);
|
Chris@16
|
67 }
|
Chris@16
|
68
|
Chris@16
|
69 template <class traits, class charT>
|
Chris@16
|
70 inline std::basic_string<charT> regex_merge(const std::basic_string<charT>& s,
|
Chris@16
|
71 const basic_regex<charT, traits>& e,
|
Chris@16
|
72 const std::basic_string<charT>& fmt,
|
Chris@16
|
73 match_flag_type flags = match_default)
|
Chris@16
|
74 {
|
Chris@16
|
75 return regex_replace(s, e, fmt, flags);
|
Chris@16
|
76 }
|
Chris@16
|
77
|
Chris@16
|
78 #ifdef BOOST_MSVC
|
Chris@16
|
79 #pragma warning(push)
|
Chris@16
|
80 #pragma warning(disable: 4103)
|
Chris@16
|
81 #endif
|
Chris@16
|
82 #ifdef BOOST_HAS_ABI_HEADERS
|
Chris@16
|
83 # include BOOST_ABI_SUFFIX
|
Chris@16
|
84 #endif
|
Chris@16
|
85 #ifdef BOOST_MSVC
|
Chris@16
|
86 #pragma warning(pop)
|
Chris@16
|
87 #endif
|
Chris@16
|
88
|
Chris@16
|
89 } // namespace boost
|
Chris@16
|
90
|
Chris@16
|
91 #endif // BOOST_REGEX_V4_REGEX_MERGE_HPP
|
Chris@16
|
92
|
Chris@16
|
93
|