提交 05c2dc3c 编写于 作者: M Max Bruckner

reformatting: cJSON_GetArrayItem

上级 4fdb6499
......@@ -1593,7 +1593,18 @@ int cJSON_GetArraySize(cJSON *array)
return i;
}
cJSON *cJSON_GetArrayItem(cJSON *array,int item) {cJSON *c=array?array->child:0;while (c && item>0) item--,c=c->next; return c;}
cJSON *cJSON_GetArrayItem(cJSON *array, int item)
{
cJSON *c = array ? array->child : 0;
while (c && item > 0)
{
item--;
c = c->next;
}
return c;
}
cJSON *cJSON_GetObjectItem(cJSON *object,const char *string) {cJSON *c=object?object->child:0;while (c && cJSON_strcasecmp(c->string,string)) c=c->next; return c;}
int cJSON_HasObjectItem(cJSON *object,const char *string) {return cJSON_GetObjectItem(object,string)?1:0;}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册