@nogc formatting utilities
Sink Types: various functions in this module use "sinks" which are buffers or objects that get filled with the formatting data while the format functions are running. The following sink types are supported to be passed into these arguments: - Arrays (isArray!S && is(ForeachType!S : char))) - NullSink - Object with put(const(char)) and put(char) functions
Passing in arrays will make the sink @nogc pure nothrow @safe as everything will be written into that memory. Passing in arrays that are too short to hold all the data will trigger a RangeError or terminate the program in betterC.
Passing in a NullSink instance will not allocate any memory and just count the bytes that will be allocated.
Otherwise any type that contains a put method that can be called both with const(char) and with char arguments can be used.
Returns string of enum member value
Formats duration. It uses custom formatter that is inspired by std.format output, but a bit shorter. Note: ISO 8601 was considered, but it's not as human readable as used format.
Formats SysTime as ISO extended string. Only UTC format supported.
Gets size needed to hold formatted string result
Same as nogcFormatTo, but it internally uses static malloc buffer to write formatted string to. So be careful that next call replaces internal buffer data and previous result isn't valid anymore.
Formats values to with fmt template into provided sink. Note: it supports only a basic subset of format type specifiers, main usage is for nogc logging and error messages formatting. But more cases can be added as needed.
pseudosink used just for calculation of resulting string length