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