Core Function EnumKey

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
UberFoX (Talk | contribs)
(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 =...")
Newer edit →

Revision as of 09:58, 12 August 2013

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