| 1694 | template <typename opt_escape> struct strconv_attribute_impl |
| 1695 | { |
| 1696 | static char_t* parse_wnorm(char_t* s, char_t end_quote) |
| 1697 | { |
| 1698 | gap g; |
| 1699 | |
| 1700 | // trim leading whitespaces |
| 1701 | if (IS_CHARTYPE(*s, ct_space)) |
| 1702 | { |
| 1703 | char_t* str = s; |
| 1704 | |
| 1705 | do ++str; |
| 1706 | while (IS_CHARTYPE(*str, ct_space)); |
| 1707 | |
| 1708 | g.push(s, str - s); |
| 1709 | } |
| 1710 | |
| 1711 | while (true) |
| 1712 | { |
| 1713 | while (!IS_CHARTYPE(*s, ct_parse_attr_ws | ct_space)) ++s; |
| 1714 | |
| 1715 | if (*s == end_quote) |
| 1716 | { |
| 1717 | char_t* str = g.flush(s); |
| 1718 | |
| 1719 | do *str-- = 0; |
| 1720 | while (IS_CHARTYPE(*str, ct_space)); |
| 1721 | |
| 1722 | return s + 1; |
| 1723 | } |
| 1724 | else if (IS_CHARTYPE(*s, ct_space)) |
| 1725 | { |
| 1726 | *s++ = ' '; |
| 1727 | |
| 1728 | if (IS_CHARTYPE(*s, ct_space)) |
| 1729 | { |
| 1730 | char_t* str = s + 1; |
| 1731 | while (IS_CHARTYPE(*str, ct_space)) ++str; |
| 1732 | |
| 1733 | g.push(s, str - s); |
| 1734 | } |
| 1735 | } |
| 1736 | else if (opt_escape::value && *s == '&') |
| 1737 | { |
| 1738 | s = strconv_escape(s, g); |
| 1739 | } |
| 1740 | else if (!*s) |
| 1741 | { |
| 1742 | return 0; |
| 1743 | } |
| 1744 | else ++s; |
| 1745 | } |
| 1746 | } |
| 1747 | |
| 1748 | static char_t* parse_wconv(char_t* s, char_t end_quote) |
| 1749 | { |
nothing calls this directly
no test coverage detected