MCPcopy Create free account
hub / github.com/WheretIB/nullc / parse_wconv

Method parse_wconv

external/pugixml/pugixml.cpp:1748–1782  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1746 }
1747
1748 static char_t* parse_wconv(char_t* s, char_t end_quote)
1749 {
1750 gap g;
1751
1752 while (true)
1753 {
1754 while (!IS_CHARTYPE(*s, ct_parse_attr_ws)) ++s;
1755
1756 if (*s == end_quote)
1757 {
1758 *g.flush(s) = 0;
1759
1760 return s + 1;
1761 }
1762 else if (IS_CHARTYPE(*s, ct_space))
1763 {
1764 if (*s == '\r')
1765 {
1766 *s++ = ' ';
1767
1768 if (*s == '\n') g.push(s, 1);
1769 }
1770 else *s++ = ' ';
1771 }
1772 else if (opt_escape::value && *s == '&')
1773 {
1774 s = strconv_escape(s, g);
1775 }
1776 else if (!*s)
1777 {
1778 return 0;
1779 }
1780 else ++s;
1781 }
1782 }
1783
1784 static char_t* parse_eol(char_t* s, char_t end_quote)
1785 {

Callers

nothing calls this directly

Calls 3

strconv_escapeFunction · 0.85
pushMethod · 0.80
flushMethod · 0.45

Tested by

no test coverage detected