Skip to content

MTY_SprintfDL

chrisd1100 edited this page Aug 25, 2022 · 1 revision

Dynamically format a string and put the result in thread local storage.

For more information, see snprintf from the C standard library.

Warning: Be careful with your format string, if it is incorrect this function will have undefined behavior.

const char *MTY_SprintfDL(
    const char * fmt,
    ...)         MTY_FMT(1,
    2
);

Parameters

fmt (const char *)

Format string.

MTY_FMT(1 (...))

2

Return value

const char *

This function can not return NULL. It will call abort() on failure.

This buffer is allocated in thread local storage and must not be freed.

Platform support

Windows   macOS   Android   Linux   Web  

See also

Module: Memory

Clone this wiki locally