Function cJSON_ReplaceItemInArray

Synopsis

#include <cJSON.h>

cJSON_bool cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem)

Description

No description yet.

Mentioned in

Source

Lines 2337-2345 in cJSON.c. Line 244 in cJSON.h.

CJSON_PUBLIC(cJSON_bool) cJSON_ReplaceItemInArray(cJSON *array, int which, cJSON *newitem)
{
    if (which < 0)
    {
        return false;
    }

    return cJSON_ReplaceItemViaPointer(array, get_array_item(array, (size_t)which), newitem);
}





Add Discussion as Guest

Log in