title: Converting Nim Enum to integer
body: <p>Is there a way to convert an Enum (or string) to its int value?</p>
  
  <pre><code>type
      CarBrands = enum
          Audi, BMW, Mercedes, Proton
  
  convertsEnumToInt[CarBrands]("Audi") # returns 0
  convertsEnumToInt[CarBrands]("Proton") # returns 3
  </code></pre>