Libical API Documentation 4.0 UNRELEASED Go to the stable 3.0 documentation
Loading...
Searching...
No Matches
icalstrarray.h
1/*======================================================================
2 FILE: icalstrarray.h
3 CREATOR: Ken Murchison 24 Aug 2022
4
5 SPDX-FileCopyrightText: 2022, Fastmail Pty. Ltd. (https://fastmail.com)
6 SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
7 ======================================================================*/
8
9#ifndef ICALSTRARRAY_H
10#define ICALSTRARRAY_H
11
12#include "libical_ical_export.h"
13#include "icalarray.h"
14
15#include <stdlib.h>
16
17typedef icalarray icalstrarray;
18
39#define icalstrarray_new(increment_size) \
40 (icalarray_new(sizeof(char *), increment_size))
41
61LIBICAL_ICAL_EXPORT const char *icalstrarray_element_at(icalstrarray *array, size_t position);
62
75LIBICAL_ICAL_EXPORT size_t icalstrarray_size(const icalstrarray *array);
76
94LIBICAL_ICAL_EXPORT size_t icalstrarray_find(icalstrarray *array,
95 const char *needle);
96
111LIBICAL_ICAL_EXPORT void icalstrarray_append(icalstrarray *array,
112 const char *elem);
113
127LIBICAL_ICAL_EXPORT void icalstrarray_add(icalstrarray *array,
128 const char *elem);
129
143LIBICAL_ICAL_EXPORT void icalstrarray_remove_element_at(icalstrarray *array,
144 size_t position);
145
158LIBICAL_ICAL_EXPORT void icalstrarray_remove(icalstrarray *array,
159 const char *del);
160
172LIBICAL_ICAL_EXPORT void icalstrarray_free(icalstrarray *array);
173
186LIBICAL_ICAL_EXPORT void icalstrarray_sort(icalstrarray *array);
187
201LIBICAL_ICAL_EXPORT icalstrarray *icalstrarray_clone(icalstrarray *array);
202
203#endif /* ICALSTRARRAY_H */
An array of arbitrarily-sized elements which grows dynamically as elements are added.
struct _icalarray icalarray
A struct representing an icalarray object.
Definition icalarray.h:26