MCPcopy Create free account
hub / github.com/MyGUI/mygui / parse_wnorm

Method parse_wnorm

Tools/EditorFramework/pugixml.cpp:2077–2132  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2075struct strconv_attribute_impl
2076{
2077 static char_t* parse_wnorm(char_t* s, char_t end_quote)
2078 {
2079 gap g;
2080
2081 // trim leading whitespaces
2082 if (PUGI__IS_CHARTYPE(*s, ct_space))
2083 {
2084 char_t* str = s;
2085
2086 do
2087 ++str;
2088 while (PUGI__IS_CHARTYPE(*str, ct_space));
2089
2090 g.push(s, str - s);
2091 }
2092
2093 while (true)
2094 {
2095 while (!PUGI__IS_CHARTYPE(*s, ct_parse_attr_ws | ct_space))
2096 ++s;
2097
2098 if (*s == end_quote)
2099 {
2100 char_t* str = g.flush(s);
2101
2102 do
2103 *str-- = 0;
2104 while (PUGI__IS_CHARTYPE(*str, ct_space));
2105
2106 return s + 1;
2107 }
2108 else if (PUGI__IS_CHARTYPE(*s, ct_space))
2109 {
2110 *s++ = ' ';
2111
2112 if (PUGI__IS_CHARTYPE(*s, ct_space))
2113 {
2114 char_t* str = s + 1;
2115 while (PUGI__IS_CHARTYPE(*str, ct_space))
2116 ++str;
2117
2118 g.push(s, str - s);
2119 }
2120 }
2121 else if (opt_escape::value && *s == '&')
2122 {
2123 s = strconv_escape(s, g);
2124 }
2125 else if (!*s)
2126 {
2127 return 0;
2128 }
2129 else
2130 ++s;
2131 }
2132 }
2133
2134 static char_t* parse_wconv(char_t* s, char_t end_quote)

Callers

nothing calls this directly

Calls 3

strconv_escapeFunction · 0.70
pushMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected