enumToString

fnstring enumToString(E)(E value) if (is(E == enum)) @safe

Converts an enum value to its string representation.

Parameters

valueThe enum value to convert.

Returns

The string representation of the enum value.

Example:

assert(enumToString(ProcessStatus.RUNNING) == "RUNNING");
assert(enumToString(ConnectionStatus.ESTABLISHED) == "ESTABLISHED");