Go to the source code of this file.
|
gcc_malloc char * | format_object (const char *format, const void *object, const char *(*getter)(const void *object, const char *name)) |
| Pretty-print an object into a string using the given format specification. More...
|
|
◆ format_object()
gcc_malloc char* format_object |
( |
const char * |
format, |
|
|
const void * |
object, |
|
|
const char *(*)(const void *object, const char *name) |
getter |
|
) |
| |
Pretty-print an object into a string using the given format specification.
- Parameters
-
format | the format string |
object | the object |
getter | a getter function that extracts a value from the object |
- Returns
- the resulting string to be freed by free(); NULL if no format string group produced any output