$darkmode
Libical API Documentation
4.0 STABLE VERSION
Visit the v3.0 documentation
Main Page
Related Pages
Data Structures
Files
File List
Globals
src
libicalvcard
vcardtextlist.c
Go to the documentation of this file.
1
/*======================================================================
2
FILE: vcardtextlist.c
3
CREATOR: Robert Stepanek 1 Feb 2026
4
5
SPDX-FileCopyrightText: 2026, Fastmail Pty. Ltd. (https://fastmail.com)
6
SPDX-License-Identifier: LGPL-2.1-only OR MPL-2.0
7
======================================================================*/
8
14
#ifdef HAVE_CONFIG_H
15
#include <config.h>
16
#endif
17
18
#include "
vcardtextlist.h
"
19
#include "
vcardvalue.h
"
20
#include "icalerror_p.h"
21
#include "
icalmemory.h
"
22
23
vcardstrarray *vcardtextlist_new_from_string(
const
char
*str,
char
sep)
24
{
25
icalerror_check_arg_rz(str != 0,
"str"
);
26
icalerror_check_arg_rz(sep != 0,
"sep"
);
27
28
vcardstrarray *array = vcardstrarray_new(2);
29
const
char
sep_str[2] = {sep, 0};
30
31
do
{
32
char
*dequoted_str = vcardvalue_strdup_and_dequote_text(&str, sep_str);
33
vcardstrarray_append(array, dequoted_str);
34
icalmemory_free_buffer
(dequoted_str);
35
}
while
(*str++ !=
'\0'
);
36
37
return
array;
38
}
icalmemory.h
Common memory management routines.
icalmemory_free_buffer
void icalmemory_free_buffer(void *buf)
Releases a buffer.
Definition:
icalmemory.c:355
vcardtextlist.h
Defines functions for creating vCard text lists.
vcardvalue.h
Defines the data structure representing vCard values.
Generated by
1.8.10