On this page
Enum Module
Functions for working with enum values.
Functions
- toString: Convert an enum variant to its string representation, using display strings when available.
Functions
Enum.toString
a -> String
Convert an enum variant to its string representation. Uses the display string when available, otherwise falls back to the variant name.
Example:
halyard
type Direction = North | South | East | West
import Enum
Enum.toString NorthNotes: For variants with data, the data is formatted after the variant name or display string.