|
3494 | 3494 | \pnum
|
3495 | 3495 | \indexlibrary{\idxcode{format_no_copy}}%
|
3496 | 3496 | \indexlibrary{\idxcode{format_first_only}}%
|
3497 |
| -\effects Constructs a \tcode{regex_iterator} object \tcode{i} |
3498 |
| -as if by \tcode{regex_iterator<BidirectionalIterator, charT, traits> |
3499 |
| -i(first, last, e, flags)}, and uses \tcode{i} to enumerate through all |
| 3497 | +\effects |
| 3498 | +Constructs a \tcode{regex_iterator} object \tcode{i} |
| 3499 | +as if by |
| 3500 | +\begin{codeblock} |
| 3501 | +regex_iterator<BidirectionalIterator, charT, traits> i(first, last, e, flags) |
| 3502 | +\end{codeblock} |
| 3503 | +and uses \tcode{i} to enumerate through all |
3500 | 3504 | of the matches \tcode{m} of type \tcode{match_results<BidirectionalIterator>}
|
3501 |
| -that occur within the sequence \range{first}{last}. If no such |
| 3505 | +that occur within the sequence \range{first}{last}. |
| 3506 | +If no such |
3502 | 3507 | matches are found and \tcode{!(flags \&
|
3503 |
| -regex_constants \colcol format_no_copy)} then calls \tcode{out = std::copy(first, |
3504 |
| -last, out)}. If any matches are found then, for each such match, |
3505 |
| -if \tcode{!(flags \& regex_constants::format_no_copy)}, calls |
3506 |
| -\tcode{out = std\colcol{}copy(m.prefix().first, m.prefix().second, \brk{}out)}, and |
3507 |
| -then calls \tcode{out = m.format(out, fmt, flags)} |
| 3508 | +regex_constants::format_no_copy)} then calls |
| 3509 | +\begin{codeblock} |
| 3510 | +out = std::copy(first, last, out) |
| 3511 | +\end{codeblock} |
| 3512 | +If any matches are found then, for each such match: |
| 3513 | +\begin{itemize} |
| 3514 | +\item |
| 3515 | +If \tcode{!(flags \& regex_constants::format_no_copy)}, calls |
| 3516 | +\begin{codeblock} |
| 3517 | +out = std::copy(m.prefix().first, m.prefix().second, out) |
| 3518 | +\end{codeblock} |
| 3519 | +\item |
| 3520 | +Then calls |
| 3521 | +\begin{codeblock} |
| 3522 | +out = m.format(out, fmt, flags) |
| 3523 | +\end{codeblock} |
3508 | 3524 | for the first form of the function and
|
3509 |
| -\tcode{out = m.format(out,} \tcode{fmt, fmt + char_traits<charT>::length(fmt), flags)} for the second. Finally, if such a match |
3510 |
| -is found and \tcode{!(flags \& regex_constants \colcol format_no_copy)}, |
3511 |
| -calls \tcode{out = std::\brk{}copy(last_m.suffix().first, last_m.suffix().second, |
3512 |
| -out)} where \tcode{last_m} is a copy of the last match |
| 3525 | +\begin{codeblock} |
| 3526 | +out = m.format(out, fmt, fmt + char_traits<charT>::length(fmt), flags) |
| 3527 | +\end{codeblock} |
| 3528 | +for the second. |
| 3529 | +\end{itemize} |
| 3530 | +Finally, if such a match |
| 3531 | +is found and \tcode{!(flags \& regex_constants::format_no_copy)}, |
| 3532 | +calls |
| 3533 | +\begin{codeblock} |
| 3534 | +out = std::copy(last_m.suffix().first, last_m.suffix().second, out) |
| 3535 | +\end{codeblock} |
| 3536 | +where \tcode{last_m} is a copy of the last match |
3513 | 3537 | found. If \tcode{flags \& regex_constants::format_first_only}
|
3514 | 3538 | is non-zero then only the first match found is replaced.
|
3515 | 3539 |
|
|
0 commit comments