Module provides stacktraces for exceptions (using the Tango TracedException hooks) and for signals (segfault, fpe, illegal instruction, abort).
Usage doesn’t require any effort besides importing the module in user code.
Module provides a phobos independent D symbol demangler.
Module provides an alternative to tango.text.convert.Layout, which uses variadic templates to extract more type information than possible with standard variadic functions. It implements support for custom and nested formatting operations that work on a heapless basis. The format string syntax is similar but not identical to that of Tango.
API Reference
Format String Reference
Module provides a simple set of functions for IO on Tango streams, including jive.layout based formatted output.
Reference
Module provides generic custom formatters for jive.layout.
Reference
Module derives phobos std.base64, adding custom formatters for jive.layout.
Reference
Module provides adaptors for modyfing the view on iterable objects.
Reference
Module derives phobos std.metastrings, but changes the format sequence to ’$’ in place of ’%s’.
Just like Tango’s Layout, the actual type of the passed in argument defines permitted subformat strings for that argument.
The general syntax for a subformat specifier is: style parameter, where style is a single character and parameter is a positive number.
Unlike in Tango, escaping the ‘{‘ character is done using a slash; ‘}’ in nested format specifiers needs to be escaped as well.
Strings have no subformat, they are formatted as-is. UTF width conversion is performed as necessary.
Style defaults to ‘d’ or ‘u’, depending on actual type.
Example:
sformat ("0x{:X10}", 0xdeadbeef); // returns "0x00DEADBEEF"
Style defaults to ‘f’.
Example:
sformat ("{:f2}", 1.234); // returns "1.23"
Style ‘p’ has no additional parameters.
Style ’*’ can be followed by a nested format specifier requesting formatting of the dereferenced value.
Style ‘z’ can be followed by a number limiting the maximum length of the zero-terminated array.
Style defaults to ‘p’.
Example:
char* lpstr = "foobar".ptr;
formatln ("{0} {0:z5}", lpstr); // outputs "0x######## fooba"
uint x = 0xdeadbeef;
uint* px = &x;
formatln ("{:*{:x}}", px); // outputs "deadbeef"
Example:
sformat ("IP={0:.}, hex={0:{:X2}}", [192, 168, 1, 1]); // returns "IP=192.168.1.1, hex=C0A80101"
Formatting this type uses tango.text.locale.Convert.formatDateTime.
uint opFormat (char[] format, uint delegate (char[]) sink)uint opFormat (wchar[] format, uint delegate (wchar[]) sink)uint opFormat (dchar[] format, uint delegate (dchar[]) sink)These methods should perform output by calling sink and return the total number of characters written.
If a formatting operation was requested that used a character type for which opFormat was not overloaded, one of the other opFormat implementations will be used and UTF conversion performed automatically.
Jive is a utility library on top of Tango that gathers various stuff D programmers might find useful.
Source is available from a mercurial repository at http://zygfryd.net/hg/jive/ or through the DSSS system.
Jive doesn’t require being compiled into a standalone library. Simply place it in your include directory.
See Documentation