| Wireshark 4.7.0 The Wireshark network protocol analyzer

Loading...
Searching...
No Matches
Macros | Functions
wmem_strutl.h File Reference
`#include <stdarg.h>`
`#include "wmem_core.h"`

Go to the source code of this file.

## Macros
#define | ws_strdup(src) wmem_strdup(NULL, src)
| Convenience macro for duplicating a string using the NULL allocator.
#define | ws_strndup(src, len) wmem_strndup(NULL, src, len)
| Convenience macro for duplicating a string up to a specified length using the NULL allocator.
#define | ws_strdup_printf(...) wmem_strdup_printf(NULL, __VA_ARGS__)
| Convenience macro for formatting a string using the NULL allocator.
#define | ws_strdup_vprintf(fmt, ap) wmem_strdup_vprintf(NULL, fmt, ap)
| Convenience macro for formatting a string using a va_list and the NULL allocator.

## Functions
WS_DLL_PUBLIC char * | wmem_strdup (wmem_allocator_t *allocator, const char *src) G_GNUC_MALLOC
| Duplicate a string using the specified memory allocator.
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.
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 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.
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.

## Detailed Description

Definitions for the Wireshark Memory Manager String Utilities Copyright 2012, Evan Huus eapac.nosp@m.he@g.nosp@m.mail..nosp@m.com

Wireshark - Network traffic analyzer By Gerald Combs geral.nosp@m.d@wi.nosp@m.resha.nosp@m.rk.o.nosp@m.rg Copyright 1998 Gerald Combs

SPDX-License-Identifier: GPL-2.0-or-later