How can I determine the name of an enum value?

ufechner7
Tue, 07 Jun 2022 23:20:03 +0000
General Usage

How can I get the name of an enum value?

@enum Animal dog cat
Int(cat)    # works
String(cat) # not working

How can I get the string representation of a variable of type Animal?
I want to get the string “cat” or “dog”.

4 posts - 3 participants