MCPcopy Create free account
hub / github.com/commonmark/cmark / cmark_strbuf_drop

Function cmark_strbuf_drop

src/buffer.c:136–146  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

134}
135
136void cmark_strbuf_drop(cmark_strbuf *buf, bufsize_t n) {
137 if (n > 0) {
138 if (n > buf->size)
139 n = buf->size;
140 buf->size = buf->size - n;
141 if (buf->size)
142 memmove(buf->ptr, buf->ptr + n, buf->size);
143
144 buf->ptr[buf->size] = '\0';
145 }
146}
147
148void cmark_strbuf_rtrim(cmark_strbuf *buf) {
149 if (!buf->size)

Callers 4

finalizeFunction · 0.85
cmark_strbuf_trimFunction · 0.85
S_normalize_codeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected