On Saturday, 5 August 2017 at 15:42:53 UTC, Rene Zwanenburg wrote:
On Saturday, 5 August 2017 at 15:33:57 UTC, Matthew Remmel wrote:Any ideas?You can use to! in std.conv: import std.stdio; import std.conv; enum Foo { A = "A", B = "B" } void main() { writeln("A".to!Foo); }
Are you fools ?
Did you ever read the post ?
I think this is a minimal solution:
enum Foo
{
A = "AV",
B = "BV",
C = "CV",
}
Foo K = [ EnumMembers!Foo ].find!(a => a == `BV`)[0];
