| 2885 | } |
| 2886 | |
| 2887 | static void minify_string(char **input, char **output) { |
| 2888 | (*output)[0] = (*input)[0]; |
| 2889 | *input += static_strlen("\""); |
| 2890 | *output += static_strlen("\""); |
| 2891 | |
| 2892 | |
| 2893 | for (; (*input)[0] != '\0'; (void)++(*input), ++(*output)) { |
| 2894 | (*output)[0] = (*input)[0]; |
| 2895 | |
| 2896 | if ((*input)[0] == '\"') { |
| 2897 | (*output)[0] = '\"'; |
| 2898 | *input += static_strlen("\""); |
| 2899 | *output += static_strlen("\""); |
| 2900 | return; |
| 2901 | } else if (((*input)[0] == '\\') && ((*input)[1] == '\"')) { |
| 2902 | (*output)[1] = (*input)[1]; |
| 2903 | *input += static_strlen("\""); |
| 2904 | *output += static_strlen("\""); |
| 2905 | } |
| 2906 | } |
| 2907 | } |
| 2908 | |
| 2909 | CJSON_PUBLIC(void) cJSON_Minify(char *json) |
| 2910 | { |
no outgoing calls
no test coverage detected
searching dependent graphs…