20 #ifndef __PIPEWIRE_UTILS_H__ 21 #define __PIPEWIRE_UTILS_H__ 27 #include <spa/utils/defs.h> 28 #include <spa/pod/pod.h> 39 pw_split_walk(
const char *str,
const char *delimiter,
size_t *len,
const char **state);
42 pw_split_strv(
const char *str,
const char *delimiter,
int max_tokens,
int *n_tokens);
48 pw_strip(
char *str,
const char *whitespace);
51 static inline struct spa_pod *
55 (
struct spa_pod *) memcpy(malloc(SPA_POD_SIZE(pod)), pod, SPA_POD_SIZE(pod))
void(* pw_destroy_t)(void *object)
a function to destroy an item
Definition: utils.h:36
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:39
static struct spa_pod * pw_spa_pod_copy(const struct spa_pod *pod)
Copy a pod structure.
Definition: utils.h:52
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:64
char * pw_strip(char *str, const char *whitespace)
Strip all whitespace before and after a string.
Definition: utils.c:115
void pw_free_strv(char **str)
Free a NULL terminated array of strings.
Definition: utils.c:97