Core Function EnumKey
From Sputnik Wiki
(Difference between revisions)
(Created page with "<pre> EnumKey( <enum>, <value> ) </pre> === Description === Return the string KEY for a given integer value === Parameters === ==== enum ==== The enum to use. ==== value =...") |
m (1 revision) |
Revision as of 21:40, 11 August 2014
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