MCPcopy Create free account
hub / github.com/ByConity/ByConity / processCDATA

Function processCDATA

src/Functions/extractTextFromHTML.cpp:111–139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

109}
110
111bool processCDATA(const char * __restrict & src, const char * end, char * __restrict & dst)
112{
113 if (!checkAndSkip(src, end, "<![CDATA["))
114 return false;
115
116 const char * gt = src;
117 while (true)
118 {
119 gt = find_first_symbols<'>'>(gt, end);
120 if (gt >= end)
121 break;
122
123 if (gt[-1] == ']' && gt[-2] == ']')
124 {
125 if (dst)
126 {
127 size_t bytes_to_copy = gt - src - strlen("]]");
128 memcpy(dst, src, bytes_to_copy);
129 dst += bytes_to_copy;
130 }
131 src = gt + 1;
132 break;
133 }
134
135 ++gt;
136 }
137
138 return true;
139}
140
141bool processElementAndSkipContent(const char * __restrict & src, const char * end, const char * tag_name)
142{

Callers 2

extractFunction · 0.85

Calls 2

checkAndSkipFunction · 0.85
memcpyFunction · 0.85

Tested by

no test coverage detected