MCPcopy Create free account
hub / github.com/antirez/botlib / minify_string

Function minify_string

cJSON.c:2807–2827  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2805}
2806
2807static void minify_string(char **input, char **output) {
2808 (*output)[0] = (*input)[0];
2809 *input += static_strlen("\"");
2810 *output += static_strlen("\"");
2811
2812
2813 for (; (*input)[0] != '\0'; (void)++(*input), ++(*output)) {
2814 (*output)[0] = (*input)[0];
2815
2816 if ((*input)[0] == '\"') {
2817 (*output)[0] = '\"';
2818 *input += static_strlen("\"");
2819 *output += static_strlen("\"");
2820 return;
2821 } else if (((*input)[0] == '\\') && ((*input)[1] == '\"')) {
2822 (*output)[1] = (*input)[1];
2823 *input += static_strlen("\"");
2824 *output += static_strlen("\"");
2825 }
2826 }
2827}
2828
2829CJSON_PUBLIC(void) cJSON_Minify(char *json)
2830{

Callers 1

cJSON_MinifyFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected