Dayz Explorer  1.24.157551 (v105080)
Dayz Code Explorer by Zeroy
enconvert.c File Reference

Go to the source code of this file.

Data Structures

class  bool
 
class  func
 
class  float
 
class  vector
 
class  typename
 
class  EnumTools
 

Enumerations

enum  EBool { NO = 0, YES = 1 }
 

Functions

proto string ToString ()
 
proto string AsciiToString ()
 Converts ASCII code to string. More...
 
string ToStringLen (int len)
 Integer to string with fixed length, padded with zeroes. More...
 
bool InRange (int min, int max, bool inclusive_min=true, bool inclusive_max=true)
 Check whether integer falls into an inclusive range. More...
 

Variables

enum EBool ZERO_PAD_SIZE = 8
 
const int MAX = 2147483647
 
const int MIN = -2147483648
 

Enumeration Type Documentation

◆ EBool

enum EBool
Enumerator
NO 
YES 

Definition at line 16 of file enconvert.c.

Function Documentation

◆ AsciiToString()

proto string AsciiToString ( )

Converts ASCII code to string.

Parameters
asciiASCII code for convert to string.
Returns
string - Converted int.
int ascii_code = 77;
string str = ascii_code.AsciiToString();
Print(str);
>> str = 'M'

◆ InRange()

bool InRange ( int  min,
int  max,
bool  inclusive_min = true,
bool  inclusive_max = true 
)

Check whether integer falls into an inclusive range.

Parameters
minint low end of range
maxint high end of range
Returns
bool True if this value is withing the set range
int num = 123;
bool test = num.InRange( 100, 150 );
Print(test);
>> s = true

Definition at line 84 of file enconvert.c.

◆ ToString()

proto string ToString ( )

◆ ToStringLen()

string ToStringLen ( int  len)

Integer to string with fixed length, padded with zeroes.

Parameters
numint integer to convert
lenint fixed length
Returns
vector Converted s as vector
int num = 123;
string s = num.ToStringLen(5);
Print(s);
>> s = '00123'

Definition at line 59 of file enconvert.c.

Variable Documentation

◆ MAX

const int MAX = 2147483647

Definition at line 27 of file enconvert.c.

◆ MIN

const int MIN = -2147483648

Definition at line 28 of file enconvert.c.

◆ ZERO_PAD_SIZE

enum EBool ZERO_PAD_SIZE = 8
Print
proto void Print(void var)
Prints content of variable to console/log.