I don't see anywhere in the documentation of std.format including the grammar of a format specifier for the following that appears to be implemented around line 1000:
- positional argument of the forms %m:n$ and %m:$
- digits and '$' following a '*' for positional width
- digits and '$' following '.*' for positional precision
Further, while the documentation for arrays (compound format) and the various output is pretty good, I don't see many examples of the other sorts of formats. There does appear to be many undocumented unit tests scattered throughout the 6700 line module, so maybe some of them can be used. Particularly, there appears to be a fairly comprehensive one at line 6226.
I suppose a certain familiarity with printf may be assumed here, but of course, this isn't exactly printf.
Comment #1 by dlang-bugzilla — 2015-10-27T09:18:04Z
In addition to the above problems, the examples in text should be moved to unit test examples.
Comment #3 by Tachyon165 — 2015-11-08T04:51:42Z
In addition to the undocumented syntax I've further noticed:
- grammar for 'Integer' technically allows leading 0's and disallows negative integers
- 'Integer' is used in the grammar for both non-negative (Position) and negative (Width, Precision) purposes
- the 'r' (raw) and 'u' (unsigned) format spec characters are not documented anywhere (neither in the grammar or the rest of the text)
That last bullet is probably more important than any other.
Caveat on the original issue: there is indeed a hyperlink very early on in the formattedWrite documentation, which goes to an external page that does explain the positional syntax/semantics: "%n$" and "*m$" but not the forms involving ':'
Incidentally, that page (2004 edition) indicates a newer version is available: http://pubs.opengroup.org/onlinepubs/9699919799/ (2013 edition). However, it doesn't appear to have anything new regarding positional notation.
Related question: is there a reason, or should std.format support the 'i', 'p', or 'n' format spec characters from the *printf family of functions?