How would I get the name of an Enum?
Say I do this code,
print(type(Enum.TextXAlignment.Left.EnumType))
It is a userdata, but I am looking for the name of the Enum.
Say the Enum is Enum.Status, I am looking to get “Status” out of it.
Hope I explained my issue well enough.
I am not trying to find a list of enums, I am trying to based off say Enum.Status
get the string “Status”
heII_ish
(heII_ish)
#4
Literally just enum.Name
:)
doytnr
(doytnr)
#5
Convert Enum.Status
to string via tostring()
, it should return 'Status'
. Same works for any enum category.
If it is an item in an enum category, it should have a .Name
variable.
2 Likes
doytnr
(doytnr)
#6
Not all enums have that. Enum.Status certainly doesn’t.
Forummer
(Forummer)
#7
They’re referring to enum items not enum lists.