MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / text_output_cdata

Function text_output_cdata

Source/ThirdParty/pugixml/pugixml.cpp:3378–3398  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3376 }
3377
3378 PUGI__FN void text_output_cdata(xml_buffered_writer& writer, const char_t* s)
3379 {
3380 do
3381 {
3382 writer.write('<', '!', '[', 'C', 'D');
3383 writer.write('A', 'T', 'A', '[');
3384
3385 const char_t* prev = s;
3386
3387 // look for ]]> sequence - we can't output it as is since it terminates CDATA
3388 while (*s && !(s[0] == ']' && s[1] == ']' && s[2] == '>')) ++s;
3389
3390 // skip ]] if we stopped at ]]>, > will go to the next CDATA section
3391 if (*s) s += 2;
3392
3393 writer.write_buffer(prev, static_cast<size_t>(s - prev));
3394
3395 writer.write(']', ']', '>');
3396 }
3397 while (*s);
3398 }
3399
3400 PUGI__FN void text_output_indent(xml_buffered_writer& writer, const char_t* indent, size_t indent_length, unsigned int depth)
3401 {

Callers 1

node_output_simpleFunction · 0.85

Calls 2

write_bufferMethod · 0.80
writeMethod · 0.45

Tested by

no test coverage detected