Home | History | Annotate | Download | only in utils

Lines Matching refs:txt

19 void json_escape_string(char *txt, size_t maxlen, const char *data, size_t len)
21 char *end = txt + maxlen;
25 if (txt + 4 >= end)
30 *txt++ = '\\';
31 *txt++ = '\"';
34 *txt++ = '\\';
35 *txt++ = '\\';
38 *txt++ = '\\';
39 *txt++ = 'n';
42 *txt++ = '\\';
43 *txt++ = 'r';
46 *txt++ = '\\';
47 *txt++ = 't';
51 *txt++ = data[i];
53 txt += os_snprintf(txt, end - txt, "\\u%04x",
60 *txt = '\0';