Appends a new element of the name name
and the value value
at the end of array
.
See: camel_name_value_array_set_named
a name
a value
Removes all elements of the array
.
Creates a new copy of the array
. The returned pointer should be freed
with camel_name_value_array_free() when no longer needed.
Compares content of the two #CamelNameValueArray and returns whether they equal. Note this is an expensive operation for large arrays.
the second #CamelNameValueArray
a compare type, one of #CamelCompareType
Frees the array,
previously allocated by camel_name_value_array_new(),
camel_name_value_array_new_sized() or camel_name_value_array_copy().
If the array
is %NULL, then does nothing.
Returns the name and the value of the element at index index
. Either
of the out_name
and out_value
can be %NULL, to not return that part.
an index
Returns the name of the element at index index
.
an index
Returns the value of the first element named name,
or %NULL when there
is no element of such name
in the array
. The compare_type
determines
how to compare the names.
a compare type, one of #CamelCompareType
a name
Returns the value of the element at index index
.
an index
Removes element at index index
.
an index to remove
Removes elements of the array
with the given name
.
The compare_type
determines hot to compare the names.
If the all_occurrences
is set to %TRUE, then every elements with the name
are removed, otherwise only the first occurrence is removed.
a compare type, one of #CamelCompareType
a name to remove
whether to remove all occurrences of the name
Sets both the name
and the value
of the element at index index
.
an index
a name
a value
Sets the name
of the element at index index
.
an index
a name
Finds an element named name
and sets its value to value,
or appends
a new element, in case no such named element exists in the array
yet.
In case there are more elements named with name
only the first
occurrence is changed. The compare_type
determines how to compare
the names.
a compare type, one of #CamelCompareType
a name
a value
Sets the value
of the element at index index
.
an index
a value
Creates a new #CamelNameValueArray. The returned pointer should be freed with camel_name_value_array_free() when no longer needed.
Creates a new #CamelNameValueArray, which has reserved reserve_size
elements. This value doesn't influence the camel_name_value_array_get_length(),
which returns zero on the array returned from this function. The returned
pointer should be freed with camel_name_value_array_free() when no longer needed.
an array size to reserve
Creates a new #CamelNameValueArray. The returned pointer should be freed with camel_name_value_array_free() when no longer needed.