| 1643 | template <typename opt_eol, typename opt_escape> struct strconv_pcdata_impl |
| 1644 | { |
| 1645 | static char_t* parse(char_t* s) |
| 1646 | { |
| 1647 | gap g; |
| 1648 | |
| 1649 | while (true) |
| 1650 | { |
| 1651 | while (!IS_CHARTYPE(*s, ct_parse_pcdata)) ++s; |
| 1652 | |
| 1653 | if (*s == '<') // PCDATA ends here |
| 1654 | { |
| 1655 | *g.flush(s) = 0; |
| 1656 | |
| 1657 | return s + 1; |
| 1658 | } |
| 1659 | else if (opt_eol::value && *s == '\r') // Either a single 0x0d or 0x0d 0x0a pair |
| 1660 | { |
| 1661 | *s++ = '\n'; // replace first one with 0x0a |
| 1662 | |
| 1663 | if (*s == '\n') g.push(s, 1); |
| 1664 | } |
| 1665 | else if (opt_escape::value && *s == '&') |
| 1666 | { |
| 1667 | s = strconv_escape(s, g); |
| 1668 | } |
| 1669 | else if (*s == 0) |
| 1670 | { |
| 1671 | return s; |
| 1672 | } |
| 1673 | else ++s; |
| 1674 | } |
| 1675 | } |
| 1676 | }; |
| 1677 | |
| 1678 | strconv_pcdata_t get_strconv_pcdata(unsigned int optmask) |
nothing calls this directly
no test coverage detected