1// Package ufmt is a preview of gno.land/p/nt/ufmt/v2, published here before2// that path exists.3//4// This is v2 of ufmt. It is not yet published at its expected path,5// gno.land/p/nt/ufmt/v2. Until it is, import it from6// gno.land/p/moul/vendor/nt/ufmt/v2; once gno.land/p/nt/ufmt/v2 is live,7// switch the import and nothing else, because the API is meant to be the same.
Functions
not supported for pure packages by the node (vm/qfuncs)
Signatures reconstructed verbatim from vm/qfuncs — interface params keep their inline definitions.
8// This path is then frozen and never updated again.
9//
10// v0 (gno.land/p/nt/ufmt/v0) supports a handful of verbs and no flags, so
11// "%08x", "%X" and "%-10s" print "(unhandled)" or drop their padding without a
12// word. v2 follows Go's fmt instead: the same flags, widths, precisions and
13// verbs, and the same error strings in place of panics. Where it cannot follow
14// Go, because gno has no reflect, it says so below.
15//
16// Supported, as in Go's fmt:
17//
18// flags '+' '-' '#' ' ' '0'
19// width %8d, %*d, and a negative * width left-justifies
20// precision %.2f, %.*f, %.3s (in runes)
21// indexes %[2]d %[1]s, %[1]*[2]d
22// general %v %+v %#v %T %%
23// bool %t
24// integer %b %c %d %o %O %q %x %X %U, every int and uint type