mir_series.toString

struct mir_series(IndexIterator_, Iterator_, size_t N_ = 1, SliceKind kind_ = Contiguous)
const
@optmath
void
toString
(
Writer
Spec
)
(
auto ref Writer w
,
const ref Spec f
)

Examples

import mir.series: series, sort;
auto s = ["b", "a"].series([9, 8]).sort;

import std.conv : to;
assert(s.to!string == `["a":8, "b":9]`);

import std.format : format;
assert("%s".format(s) == `["a":8, "b":9]`);
assert("%(%s %s | %)".format(s) == `"a" 8 | "b" 9`);
assert("%-(%s,%s\n%)\n".format(s) == "a,8\nb,9\n");

Meta