Range format specifiers in other languages?

Ali Çehreli acehreli at yahoo.com
Sun Oct 11 23:57:31 UTC 2020


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


More information about the Digitalmars-d-learn mailing list