Download Reference Manual
The Developer's Library for D
About Wiki Forums Source Search Contact

Ticket #191 (closed enhancement: wontfix)

Opened 5 years ago

Last modified 5 years ago

Variable field widths

Reported by: KirkMcDonald Assigned to: kris
Priority: normal Milestone: 1.0
Component: Tango Version:
Keywords: format Cc:

Description

printf-style format strings support variable field widths:

int i = 20;
writefln("%*s", i, "some string");

Tango's format strings do not appear to have this functionality, which is extraordinarily useful when printing columnar output.

Change History

02/26/07 08:09:00 changed by larsivi

Could you provide an example showing the expected output?

03/02/07 19:09:07 changed by kris

  • priority changed from major to normal.
  • milestone set to 1.0.

03/02/07 19:10:05 changed by kris

  • status changed from new to assigned.

03/04/07 02:47:13 changed by kris

  • status changed from assigned to closed.
  • resolution set to wontfix.

decided to not do this, since it introduces a dependency in the ordering of the arguments (which is no good when indexing is applied).

Recommend the provision of a wrapper for handling the % of cases where this functionality is needed.