12#ifndef __WMEM_STRUTL_H__
13#define __WMEM_STRUTL_H__
49#define ws_strdup(src) wmem_strdup(NULL, src)
69#define ws_strndup(src, len) wmem_strndup(NULL, src, len)
87G_GNUC_MALLOC G_GNUC_PRINTF(2, 3);
89#define ws_strdup_printf(...) wmem_strdup_printf(NULL, __VA_ARGS__)
109#define ws_strdup_vprintf(fmt, ap) wmem_strdup_vprintf(NULL, fmt, ap)
123const uint8_t *
ws_memmem(
const void *haystack,
size_t haystack_len,
124 const void *needle,
size_t needle_len);
WS_DLL_PUBLIC char * wmem_strndup(wmem_allocator_t *allocator, const char *src, const size_t len) G_GNUC_MALLOC
Duplicate a string up to a specified length using the given memory allocator.
Definition wmem_strutl.c:36
WS_DLL_PUBLIC char * wmem_strdup_vprintf(wmem_allocator_t *allocator, const char *fmt, va_list ap) G_GNUC_MALLOC
Allocate and format a string using a va_list and the specified memory allocator.
Definition wmem_strutl.c:83
WS_DLL_PUBLIC char * wmem_strdup_printf(wmem_allocator_t *allocator, const char *fmt,...) G_GNUC_MALLOC G_GNUC_PRINTF(2
Allocate and format a string using the specified memory allocator.
WS_DLL_PUBLIC const uint8_t * ws_memmem(const void *haystack, size_t haystack_len, const void *needle, size_t needle_len)
Return the first occurrence of needle in haystack.
Definition wmem_strutl.c:117
WS_DLL_PUBLIC char * wmem_strdup(wmem_allocator_t *allocator, const char *src) G_GNUC_MALLOC
Duplicate a string using the specified memory allocator.
Definition wmem_strutl.c:20
Definition wmem_allocator.h:27