Core Function EnumValue

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
UberFoX (Talk | contribs)
(Created page with "<pre> EnumValue( <enum>, <value> ) </pre> === Description === Return the integer value for a given string KEY === Parameters === ==== enum ==== The enum to use. ==== value...")
Newer edit →

Revision as of 10:00, 12 August 2013

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