Go to the documentation of this file.
   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 *
 
   60         size = SPA_POD_SIZE(pod);
 
   61         if ((c = (
struct spa_pod *) malloc(size)) == NULL)
 
   64         return (
struct spa_pod *) memcpy(c, pod, size);
 
  
 
const SPA_EXPORT 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:40
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:66
static struct spa_pod * pw_spa_pod_copy(const struct spa_pod *pod)
Copy a pod structure.
Definition: utils.h:52
An array object.
Definition: array.h:36
#define pw_array_add_ptr(a, p)
Add a pointer to array.
Definition: array.h:127
SPA_EXPORT char * pw_strip(char *str, const char *whitespace)
Strip all whitespace before and after a string.
Definition: utils.c:119
void * data
pointer to array data
Definition: array.h:37
SPA_EXPORT void pw_free_strv(char **str)
Free a NULL terminated array of strings.
Definition: utils.c:100
static void pw_array_init(struct pw_array *arr, size_t extend)
Initialize the array with given extend.
Definition: array.h:62
void(* pw_destroy_t)(void *object)
a function to destroy an item
Definition: utils.h:36