Created attachment 368
Adds enumToString and enumFromString
The patch adds new template functions enumToString and enumFromString to std.conv. These functions convert between an enum member value and its name, and do not require that enums should be defined by some template (cf. defineEnum).
Comment #1 by andrei — 2009-05-16T05:08:13Z
Looks great! I'll add the functions and credit for you in std.conv. Thank you, Shin!
Comment #2 by andrei — 2009-07-03T21:14:21Z
I just merged Shin's implementation to std.conv and added his name to the list of authors for the module. Instead of adding enumToString and enumFromString, I had Shin's code replace the corresponding "to" functions directly. The feature will be part of the next release.