toStringFaster

Fast and more generic implementation of std.conv.to for enumerations.

@safe pure nothrow @safe @nogc
string
toStringFaster
(
T
)
(
const scope T value
)
if (
is(T == enum)
)

Examples

enum E { unknown, x, y, z, }
assert(E.x.toStringFaster == "x");
assert(E.y.toStringFaster == "y");
assert(E.z.toStringFaster == "z");

Meta