tmp/tmpb8x8fav8/{from.md → to.md}
RENAMED
|
@@ -1,64 +1,71 @@
|
|
| 1 |
### `match_results` formatting <a id="re.results.form">[[re.results.form]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template <class OutputIter>
|
| 5 |
-
OutputIter format(
|
|
|
|
| 6 |
const char_type* fmt_first, const char_type* fmt_last,
|
| 7 |
-
|
| 8 |
-
regex_constants::format_default) const;
|
| 9 |
```
|
| 10 |
|
| 11 |
-
*Requires:*
|
| 12 |
requirements for an Output Iterator ([[output.iterators]]).
|
| 13 |
|
| 14 |
*Effects:* Copies the character sequence \[`fmt_first`, `fmt_last`) to
|
| 15 |
OutputIter `out`. Replaces each format specifier or escape sequence in
|
| 16 |
the copied range with either the character(s) it represents or the
|
| 17 |
sequence of characters within `*this` to which it refers. The bitmasks
|
| 18 |
specified in `flags` determine which format specifiers and escape
|
| 19 |
sequences are recognized.
|
| 20 |
|
| 21 |
-
*Returns:*
|
| 22 |
|
| 23 |
``` cpp
|
| 24 |
template <class OutputIter, class ST, class SA>
|
| 25 |
-
OutputIter format(
|
|
|
|
| 26 |
const basic_string<char_type, ST, SA>& fmt,
|
| 27 |
-
|
| 28 |
-
regex_constants::format_default) const;
|
| 29 |
```
|
| 30 |
|
| 31 |
-
*Effects:* Equivalent to
|
| 32 |
-
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
``` cpp
|
| 35 |
template <class ST, class SA>
|
| 36 |
-
basic_string<char_type, ST, SA>
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
regex_constants::format_default) const;
|
| 40 |
```
|
| 41 |
|
| 42 |
*Requires:* `ready() == true`.
|
| 43 |
|
| 44 |
*Effects:* Constructs an empty string `result` of type
|
| 45 |
-
`basic_string<char_type, ST, SA>` and calls
|
| 46 |
-
`format(back_inserter(result), fmt, flags)`.
|
| 47 |
|
| 48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
|
| 50 |
``` cpp
|
| 51 |
-
string_type
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
regex_constants::format_default) const;
|
| 55 |
```
|
| 56 |
|
| 57 |
*Requires:* `ready() == true`.
|
| 58 |
|
| 59 |
-
*Effects:*
|
| 60 |
-
|
| 61 |
-
calls`format(back_inserter(result), fmt, fmt + char_traits<char_type>::length(fmt), flags)`.
|
| 62 |
|
| 63 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 64 |
|
|
|
|
| 1 |
### `match_results` formatting <a id="re.results.form">[[re.results.form]]</a>
|
| 2 |
|
| 3 |
``` cpp
|
| 4 |
template <class OutputIter>
|
| 5 |
+
OutputIter format(
|
| 6 |
+
OutputIter out,
|
| 7 |
const char_type* fmt_first, const char_type* fmt_last,
|
| 8 |
+
regex_constants::match_flag_type flags = regex_constants::format_default) const;
|
|
|
|
| 9 |
```
|
| 10 |
|
| 11 |
+
*Requires:* `ready() == true` and `OutputIter` shall satisfy the
|
| 12 |
requirements for an Output Iterator ([[output.iterators]]).
|
| 13 |
|
| 14 |
*Effects:* Copies the character sequence \[`fmt_first`, `fmt_last`) to
|
| 15 |
OutputIter `out`. Replaces each format specifier or escape sequence in
|
| 16 |
the copied range with either the character(s) it represents or the
|
| 17 |
sequence of characters within `*this` to which it refers. The bitmasks
|
| 18 |
specified in `flags` determine which format specifiers and escape
|
| 19 |
sequences are recognized.
|
| 20 |
|
| 21 |
+
*Returns:* `out`.
|
| 22 |
|
| 23 |
``` cpp
|
| 24 |
template <class OutputIter, class ST, class SA>
|
| 25 |
+
OutputIter format(
|
| 26 |
+
OutputIter out,
|
| 27 |
const basic_string<char_type, ST, SA>& fmt,
|
| 28 |
+
regex_constants::match_flag_type flags = regex_constants::format_default) const;
|
|
|
|
| 29 |
```
|
| 30 |
|
| 31 |
+
*Effects:* Equivalent to:
|
| 32 |
+
|
| 33 |
+
``` cpp
|
| 34 |
+
return format(out, fmt.data(), fmt.data() + fmt.size(), flags);
|
| 35 |
+
```
|
| 36 |
|
| 37 |
``` cpp
|
| 38 |
template <class ST, class SA>
|
| 39 |
+
basic_string<char_type, ST, SA> format(
|
| 40 |
+
const basic_string<char_type, ST, SA>& fmt,
|
| 41 |
+
regex_constants::match_flag_type flags = regex_constants::format_default) const;
|
|
|
|
| 42 |
```
|
| 43 |
|
| 44 |
*Requires:* `ready() == true`.
|
| 45 |
|
| 46 |
*Effects:* Constructs an empty string `result` of type
|
| 47 |
+
`basic_string<char_type, ST, SA>` and calls:
|
|
|
|
| 48 |
|
| 49 |
+
``` cpp
|
| 50 |
+
format(back_inserter(result), fmt, flags);
|
| 51 |
+
```
|
| 52 |
+
|
| 53 |
+
*Returns:* `result`.
|
| 54 |
|
| 55 |
``` cpp
|
| 56 |
+
string_type format(
|
| 57 |
+
const char_type* fmt,
|
| 58 |
+
regex_constants::match_flag_type flags = regex_constants::format_default) const;
|
|
|
|
| 59 |
```
|
| 60 |
|
| 61 |
*Requires:* `ready() == true`.
|
| 62 |
|
| 63 |
+
*Effects:* Constructs an empty string `result` of type `string_type` and
|
| 64 |
+
calls:
|
|
|
|
| 65 |
|
| 66 |
+
``` cpp
|
| 67 |
+
format(back_inserter(result), fmt, fmt + char_traits<char_type>::length(fmt), flags);
|
| 68 |
+
```
|
| 69 |
+
|
| 70 |
+
*Returns:* `result`.
|
| 71 |
|