Core Function EnumValue
From Sputnik Wiki
EnumValue( <enum>, <value> )
Contents |
Description
Return the integer value for a given string KEY
Parameters
enum
The enum to use.
value
The value to find the Key of.
Return Value
Success: Returns the Value that contains that the Key name links to.
Failure: Returns empty string.
Remarks
None.
Example
enum LOL { $Cat, $Dog }; println( "Value is: " . EnumValue('LOL', 'Cat') ); // Prints: 0 println( "Value is: " . EnumValue('LOL', 'Dog') ); // Prints: 1