MCPcopy Create free account
hub / github.com/danoon2/Boxedwine / write_string

Method write_string

lib/pugixml/src/pugixml.cpp:3782–3805  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3780 }
3781
3782 void write_string(const char_t* data)
3783 {
3784 // write the part of the string that fits in the buffer
3785 size_t offset = bufsize;
3786
3787 while (*data && offset < bufcapacity)
3788 buffer[offset++] = *data++;
3789
3790 // write the rest
3791 if (offset < bufcapacity)
3792 {
3793 bufsize = offset;
3794 }
3795 else
3796 {
3797 // backtrack a bit if we have split the codepoint
3798 size_t length = offset - bufsize;
3799 size_t extra = length - get_valid_length(data - length, length);
3800
3801 bufsize = offset - extra;
3802
3803 write_direct(data - extra, strlength(data) + extra);
3804 }
3805 }
3806
3807 void write(char_t d0)
3808 {

Callers 6

text_outputFunction · 0.80
node_output_attributesFunction · 0.80
node_output_startFunction · 0.80
node_output_endFunction · 0.80
node_output_simpleFunction · 0.80
saveMethod · 0.80

Calls 2

get_valid_lengthFunction · 0.85
strlengthFunction · 0.85

Tested by

no test coverage detected