DOKK / manpages / debian 12 / wget2-dev / libwget-mem.3.en
libwget-mem(3) wget2 libwget-mem(3)

libwget-mem - Memory functions


void * wget_memdup (const void *m, size_t n)
char * wget_strdup (const char *s)
char * wget_strmemdup (const void *m, size_t n)
void wget_strmemcpy (char *s, size_t ssize, const void *m, size_t n)

This is a collections of short memory function not available in standard libraries.

Parameters

m Memory to clone
n Length of memory

Returns

Cloned memory

Clone's the memory region m with length n. Returns NULL if m is NULL.

You should free() the returned pointer when not needed any more.

Parameters

s String to clone

Returns

Cloned string

Clone's the string s like strdup() does. Returns NULL if s is NULL.

You should free() the returned string when not needed any more.

Parameters

m Memory to convert into string
n Length of memory

Returns

Created string

Convert the given memory region m with length n into a C string. Returns NULL if m is NULL.

You should free() the returned string when not needed any more.

Parameters

s Buffer to hold the C string output
ssize Size of the output buffer
m Memory to read from
n Length of memory

Convert the given memory region m with length n into a C string at s. A max. of ssize - 1 is copied into s.

Generated automatically by Doxygen for wget2 from the source code.

Tue Jan 26 2021 Version 1.99.1