Range format specifiers in other languages?
Imperatorn
johan_forsberg_86 at hotmail.com
Mon Oct 12 00:46:37 UTC 2020
On Sunday, 11 October 2020 at 23:57:31 UTC, Ali Çehreli wrote:
> I find D's %( and %) range format specifiers very useful:
>
> import std.stdio;
> import std.range;
>
> void main() {
> 5.iota.writefln!"%(%s, %)"; // Prints 0, 1, 2, 3, 4
> }
>
> Are there similar features in other languages?
>
> Thank you,
> Ali
To people trying to learn, why is that % before ( needed in the
format string?
More information about the Digitalmars-d-learn
mailing list