Getting enum from value
Stefan Koch via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sat Aug 5 08:41:46 PDT 2017
On Saturday, 5 August 2017 at 15:33:57 UTC, Matthew Remmel wrote:
> I feel like I'm missing something, but there has to be an
> easier way to convert a value into an enum than switching over
> every possible value: i.e
>
> [...]
What you want is already in the standard library.
std.conv.to can convert strings to enums and back.
More information about the Digitalmars-d-learn
mailing list