tmp/tmpwgrvc09x/{from.md → to.md}
RENAMED
|
@@ -6,21 +6,18 @@ template <class OutputIterator, class BidirectionalIterator,
|
|
| 6 |
OutputIterator
|
| 7 |
regex_replace(OutputIterator out,
|
| 8 |
BidirectionalIterator first, BidirectionalIterator last,
|
| 9 |
const basic_regex<charT, traits>& e,
|
| 10 |
const basic_string<charT, ST, SA>& fmt,
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
template <class OutputIterator, class BidirectionalIterator,
|
| 14 |
-
class traits, class charT>
|
| 15 |
OutputIterator
|
| 16 |
regex_replace(OutputIterator out,
|
| 17 |
BidirectionalIterator first, BidirectionalIterator last,
|
| 18 |
const basic_regex<charT, traits>& e,
|
| 19 |
const charT* fmt,
|
| 20 |
-
|
| 21 |
-
regex_constants::match_default);
|
| 22 |
```
|
| 23 |
|
| 24 |
*Effects:* Constructs a `regex_iterator` object `i` as if by
|
| 25 |
|
| 26 |
``` cpp
|
|
@@ -28,21 +25,21 @@ regex_iterator<BidirectionalIterator, charT, traits> i(first, last, e, flags)
|
|
| 28 |
```
|
| 29 |
|
| 30 |
and uses `i` to enumerate through all of the matches `m` of type
|
| 31 |
`match_results<BidirectionalIterator>` that occur within the sequence
|
| 32 |
\[`first`, `last`). If no such matches are found and
|
| 33 |
-
`!(flags & regex_constants::format_no_copy)` then calls
|
| 34 |
|
| 35 |
``` cpp
|
| 36 |
-
out =
|
| 37 |
```
|
| 38 |
|
| 39 |
If any matches are found then, for each such match:
|
| 40 |
|
| 41 |
- If `!(flags & regex_constants::format_no_copy)`, calls
|
| 42 |
``` cpp
|
| 43 |
-
out =
|
| 44 |
```
|
| 45 |
- Then calls
|
| 46 |
``` cpp
|
| 47 |
out = m.format(out, fmt, flags)
|
| 48 |
```
|
|
@@ -56,60 +53,62 @@ If any matches are found then, for each such match:
|
|
| 56 |
|
| 57 |
Finally, if such a match is found and
|
| 58 |
`!(flags & regex_constants::format_no_copy)`, calls
|
| 59 |
|
| 60 |
``` cpp
|
| 61 |
-
out =
|
| 62 |
```
|
| 63 |
|
| 64 |
where `last_m` is a copy of the last match found. If
|
| 65 |
-
`flags & regex_constants::format_first_only` is
|
| 66 |
first match found is replaced.
|
| 67 |
|
| 68 |
*Returns:* `out`.
|
| 69 |
|
| 70 |
``` cpp
|
| 71 |
template <class traits, class charT, class ST, class SA, class FST, class FSA>
|
| 72 |
basic_string<charT, ST, SA>
|
| 73 |
regex_replace(const basic_string<charT, ST, SA>& s,
|
| 74 |
const basic_regex<charT, traits>& e,
|
| 75 |
const basic_string<charT, FST, FSA>& fmt,
|
| 76 |
-
|
| 77 |
-
regex_constants::match_default);
|
| 78 |
template <class traits, class charT, class ST, class SA>
|
| 79 |
basic_string<charT, ST, SA>
|
| 80 |
regex_replace(const basic_string<charT, ST, SA>& s,
|
| 81 |
const basic_regex<charT, traits>& e,
|
| 82 |
const charT* fmt,
|
| 83 |
-
|
| 84 |
-
regex_constants::match_default);
|
| 85 |
```
|
| 86 |
|
| 87 |
*Effects:* Constructs an empty string `result` of type
|
| 88 |
-
`basic_string<charT, ST, SA>` and calls
|
| 89 |
-
`regex_replace(back_inserter(result), s.begin(), s.end(), e, fmt, flags)`.
|
| 90 |
|
| 91 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 92 |
|
| 93 |
``` cpp
|
| 94 |
template <class traits, class charT, class ST, class SA>
|
| 95 |
basic_string<charT>
|
| 96 |
regex_replace(const charT* s,
|
| 97 |
const basic_regex<charT, traits>& e,
|
| 98 |
const basic_string<charT, ST, SA>& fmt,
|
| 99 |
-
|
| 100 |
-
regex_constants::match_default);
|
| 101 |
template <class traits, class charT>
|
| 102 |
basic_string<charT>
|
| 103 |
regex_replace(const charT* s,
|
| 104 |
const basic_regex<charT, traits>& e,
|
| 105 |
const charT* fmt,
|
| 106 |
-
|
| 107 |
-
regex_constants::match_default);
|
| 108 |
```
|
| 109 |
|
| 110 |
*Effects:* Constructs an empty string `result` of type
|
| 111 |
-
`basic_string<charT>` and calls
|
| 112 |
-
`back_inserter(result), s, s + char_traits<charT>::length(s), e, fmt, flags)`.
|
| 113 |
|
| 114 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 115 |
|
|
|
|
| 6 |
OutputIterator
|
| 7 |
regex_replace(OutputIterator out,
|
| 8 |
BidirectionalIterator first, BidirectionalIterator last,
|
| 9 |
const basic_regex<charT, traits>& e,
|
| 10 |
const basic_string<charT, ST, SA>& fmt,
|
| 11 |
+
regex_constants::match_flag_type flags = regex_constants::match_default);
|
| 12 |
+
template <class OutputIterator, class BidirectionalIterator, class traits, class charT>
|
|
|
|
|
|
|
| 13 |
OutputIterator
|
| 14 |
regex_replace(OutputIterator out,
|
| 15 |
BidirectionalIterator first, BidirectionalIterator last,
|
| 16 |
const basic_regex<charT, traits>& e,
|
| 17 |
const charT* fmt,
|
| 18 |
+
regex_constants::match_flag_type flags = regex_constants::match_default);
|
|
|
|
| 19 |
```
|
| 20 |
|
| 21 |
*Effects:* Constructs a `regex_iterator` object `i` as if by
|
| 22 |
|
| 23 |
``` cpp
|
|
|
|
| 25 |
```
|
| 26 |
|
| 27 |
and uses `i` to enumerate through all of the matches `m` of type
|
| 28 |
`match_results<BidirectionalIterator>` that occur within the sequence
|
| 29 |
\[`first`, `last`). If no such matches are found and
|
| 30 |
+
`!(flags & regex_constants::format_no_copy)`, then calls
|
| 31 |
|
| 32 |
``` cpp
|
| 33 |
+
out = copy(first, last, out)
|
| 34 |
```
|
| 35 |
|
| 36 |
If any matches are found then, for each such match:
|
| 37 |
|
| 38 |
- If `!(flags & regex_constants::format_no_copy)`, calls
|
| 39 |
``` cpp
|
| 40 |
+
out = copy(m.prefix().first, m.prefix().second, out)
|
| 41 |
```
|
| 42 |
- Then calls
|
| 43 |
``` cpp
|
| 44 |
out = m.format(out, fmt, flags)
|
| 45 |
```
|
|
|
|
| 53 |
|
| 54 |
Finally, if such a match is found and
|
| 55 |
`!(flags & regex_constants::format_no_copy)`, calls
|
| 56 |
|
| 57 |
``` cpp
|
| 58 |
+
out = copy(last_m.suffix().first, last_m.suffix().second, out)
|
| 59 |
```
|
| 60 |
|
| 61 |
where `last_m` is a copy of the last match found. If
|
| 62 |
+
`flags & regex_constants::format_first_only` is nonzero, then only the
|
| 63 |
first match found is replaced.
|
| 64 |
|
| 65 |
*Returns:* `out`.
|
| 66 |
|
| 67 |
``` cpp
|
| 68 |
template <class traits, class charT, class ST, class SA, class FST, class FSA>
|
| 69 |
basic_string<charT, ST, SA>
|
| 70 |
regex_replace(const basic_string<charT, ST, SA>& s,
|
| 71 |
const basic_regex<charT, traits>& e,
|
| 72 |
const basic_string<charT, FST, FSA>& fmt,
|
| 73 |
+
regex_constants::match_flag_type flags = regex_constants::match_default);
|
|
|
|
| 74 |
template <class traits, class charT, class ST, class SA>
|
| 75 |
basic_string<charT, ST, SA>
|
| 76 |
regex_replace(const basic_string<charT, ST, SA>& s,
|
| 77 |
const basic_regex<charT, traits>& e,
|
| 78 |
const charT* fmt,
|
| 79 |
+
regex_constants::match_flag_type flags = regex_constants::match_default);
|
|
|
|
| 80 |
```
|
| 81 |
|
| 82 |
*Effects:* Constructs an empty string `result` of type
|
| 83 |
+
`basic_string<charT, ST, SA>` and calls:
|
|
|
|
| 84 |
|
| 85 |
+
``` cpp
|
| 86 |
+
regex_replace(back_inserter(result), s.begin(), s.end(), e, fmt, flags);
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
*Returns:* `result`.
|
| 90 |
|
| 91 |
``` cpp
|
| 92 |
template <class traits, class charT, class ST, class SA>
|
| 93 |
basic_string<charT>
|
| 94 |
regex_replace(const charT* s,
|
| 95 |
const basic_regex<charT, traits>& e,
|
| 96 |
const basic_string<charT, ST, SA>& fmt,
|
| 97 |
+
regex_constants::match_flag_type flags = regex_constants::match_default);
|
|
|
|
| 98 |
template <class traits, class charT>
|
| 99 |
basic_string<charT>
|
| 100 |
regex_replace(const charT* s,
|
| 101 |
const basic_regex<charT, traits>& e,
|
| 102 |
const charT* fmt,
|
| 103 |
+
regex_constants::match_flag_type flags = regex_constants::match_default);
|
|
|
|
| 104 |
```
|
| 105 |
|
| 106 |
*Effects:* Constructs an empty string `result` of type
|
| 107 |
+
`basic_string<charT>` and calls:
|
|
|
|
| 108 |
|
| 109 |
+
``` cpp
|
| 110 |
+
regex_replace(back_inserter(result), s, s + char_traits<charT>::length(s), e, fmt, flags);
|
| 111 |
+
```
|
| 112 |
+
|
| 113 |
+
*Returns:* `result`.
|
| 114 |
|