I have a string value, I also have an array of strings and an enum containing the range also. To get the index of the string in the array, from the value supplied I write th
Not sure if I understand you correctly but based on question title you may be looking for
YourEnum.valueOf("VALUE").ordinal();
YourEnum.valueOf("VALUE")
"VALUE"
ordinal()