MCPcopy Create free account
hub / github.com/Aloshi/EmulationStation / parse

Method parse

src/pugiXML/pugixml.cpp:1817–1847  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1815 template <typename opt_eol, typename opt_escape> struct strconv_pcdata_impl
1816 {
1817 static char_t* parse(char_t* s)
1818 {
1819 gap g;
1820
1821 while (true)
1822 {
1823 while (!PUGI__IS_CHARTYPE(*s, ct_parse_pcdata)) ++s;
1824
1825 if (*s == '<') // PCDATA ends here
1826 {
1827 *g.flush(s) = 0;
1828
1829 return s + 1;
1830 }
1831 else if (opt_eol::value && *s == '\r') // Either a single 0x0d or 0x0d 0x0a pair
1832 {
1833 *s++ = '\n'; // replace first one with 0x0a
1834
1835 if (*s == '\n') g.push(s, 1);
1836 }
1837 else if (opt_escape::value && *s == '&')
1838 {
1839 s = strconv_escape(s, g);
1840 }
1841 else if (*s == 0)
1842 {
1843 return s;
1844 }
1845 else ++s;
1846 }
1847 }
1848 };
1849
1850 PUGI__FN strconv_pcdata_t get_strconv_pcdata(unsigned int optmask)

Callers

nothing calls this directly

Calls 3

strconv_escapeFunction · 0.85
pushMethod · 0.80
flushMethod · 0.45

Tested by

no test coverage detected