Core Function EnumKey

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
m (1 revision)
m (1 revision)
 

Latest revision as of 12:37, 14 June 2015

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
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox