mi_strdup

Allocate and duplicate a string.

extern (C) @nogc pure @system nothrow
char*
mi_strdup
(
const(char)* s
)

Parameters

s
Type: const(char)*

string to duplicate (or NULL).

Return Value

Type: char*

a pointer to newly allocated memory initialized to string s, or NULL if either out of memory or if s is NULL.

Replacement for the standard strdup() such that mi_free() can be used on the returned result.

Meta