MCPcopy Create free account
hub / github.com/Snapchat/KeyDB / sparklineRender

Function sparklineRender

src/sparkline.cpp:165–175  ·  view source on GitHub ↗

Turn a sequence into its ASCII representation */

Source from the content-addressed store, hash-verified

163
164/* Turn a sequence into its ASCII representation */
165sds sparklineRender(sds output, struct sequence *seq, int columns, int rows, int flags) {
166 int j;
167
168 for (j = 0; j < seq->length; j += columns) {
169 int sublen = (seq->length-j) < columns ? (seq->length-j) : columns;
170
171 if (j != 0) output = sdscatlen(output,"\n",1);
172 output = sparklineRenderRange(output, seq, rows, j, sublen, flags);
173 }
174 return output;
175}
176

Callers 1

Calls 2

sdscatlenFunction · 0.85
sparklineRenderRangeFunction · 0.85

Tested by

no test coverage detected