PipeWire  0.3.15
utils.h File Reference
Include dependency graph for utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define strndupa(s, n)
 

Functions

const char * pw_split_walk (const char *str, const char *delimiter, size_t *len, const char **state)
 
char ** pw_split_strv (const char *str, const char *delimiter, int max_tokens, int *n_tokens)
 
void pw_free_strv (char **str)
 
char * pw_strip (char *str, const char *whitespace)
 

Macro Definition Documentation

◆ strndupa

#define strndupa (   s,
 
)
Value:
({ \
const char *__old = (s); \
size_t __len = strnlen(__old, (n)); \
char *__new = (char *) __builtin_alloca(__len + 1); \
memcpy(__new, __old, __len); \
__new[__len] = '\0'; \
__new; \
})

Function Documentation

◆ pw_free_strv()

void pw_free_strv ( char **  str)

◆ pw_split_strv()

char** pw_split_strv ( const char *  str,
const char *  delimiter,
int  max_tokens,
int *  n_tokens 
)

◆ pw_split_walk()

const char* pw_split_walk ( const char *  str,
const char *  delimiter,
size_t *  len,
const char **  state 
)

◆ pw_strip()

char* pw_strip ( char *  str,
const char *  whitespace 
)