MCPcopy Create free account
hub / github.com/IBM/Project_CodeNet / CSV_escape

Function CSV_escape

tools/tokenizer/antlr4tojson.c:195–204  ·  view source on GitHub ↗

Escape token for output as CSV string.

Source from the content-addressed store, hash-verified

193
194// Escape token for output as CSV string.
195static void CSV_escape(FILE *out, const char *p, unsigned len)
196{
197 for (; len; len--, p++) {
198 if (*p == '"')
199 // Double the double quote:
200 fputc('\"', out);
201 //else Not a "; default action.
202 fputc(*p, out);
203 }
204}
205
206// Returns length of matched token (ws inclusive) or 0 when in error.
207static unsigned get(char const *text)

Callers 1

getFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected