Core Function EnumValue

From Sputnik Wiki
(Difference between revisions)
Jump to: navigation, search
(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...")
 
m (1 revision)
 
(One intermediate revision by one user not shown)

Latest revision as of 12:37, 14 June 2015

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