Go to the documentation of this file.
25 #ifndef PIPEWIRE_UTILS_H
26 #define PIPEWIRE_UTILS_H
32 #include <spa/utils/defs.h>
33 #include <spa/pod/pod.h>
44 pw_split_walk(
const char *str,
const char *delimiter,
size_t *len,
const char **state);
47 pw_split_strv(
const char *str,
const char *delimiter,
int max_tokens,
int *n_tokens);
SPA_EXPORT char ** pw_split_strv(const char *str, const char *delimiter, int max_tokens, int *n_tokens)
Split a string based on delimiters.
Definition: utils.c:71
An array object.
Definition: array.h:43
#define pw_array_add_ptr(a, p)
Add a pointer to array.
Definition: array.h:158
SPA_EXPORT const char * pw_split_walk(const char *str, const char *delimiter, size_t *len, const char **state)
Split a string based on delimiters.
Definition: utils.c:45
SPA_EXPORT char * pw_strip(char *str, const char *whitespace)
Strip all whitespace before and after a string.
Definition: utils.c:124
void * data
pointer to array data
Definition: array.h:44
SPA_EXPORT void pw_free_strv(char **str)
Free a NULL terminated array of strings.
Definition: utils.c:105
static void pw_array_init(struct pw_array *arr, size_t extend)
Initialize the array with given extend.
Definition: array.h:85
void(* pw_destroy_t)(void *object)
a function to destroy an item
Definition: utils.h:41