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);
53 pw_strip(
char *str,
const char *whitespace);
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
void(* pw_destroy_t)(void *object)
a function to destroy an item
Definition: utils.h:41
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
SPA_EXPORT void pw_free_strv(char **str)
Free a NULL terminated array of strings.
Definition: utils.c:105
SPA_EXPORT char * pw_strip(char *str, const char *whitespace)
Strip all whitespace before and after a string.
Definition: utils.c:124