Enfusion Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Attributes | List of all members
int Interface Reference

Public Member Functions

proto external string AsciiToString ()
 Converts ASCII code to string.
 
proto external string ToString (int len=-1)
 Integer to string with fixed length, padded with zeroes.
 
proto external int Sign ()
 Returns an integer that indicates the sign of a number.
 

Static Public Attributes

const int MAX = 2147483647
 
const int MIN = -2147483648
 

Member Function Documentation

◆ AsciiToString()

proto external string int.AsciiToString ( )

Converts ASCII code to string.

Returns
string - Converted int.
int ascii_code = 77;
string str = ascii_code.AsciiToString();
Print(str);
>> str = 'M'
proto void Print(void var, LogLevel level=LogLevel.NORMAL)
Prints content of variable to console/log.
proto external string AsciiToString()
Converts ASCII code to string.

◆ Sign()

proto external int int.Sign ( )

Returns an integer that indicates the sign of a number.

  • For intNumber.Sign() < 0 result is -1.
  • For intNumber.Sign() == 0 result is 0.
  • For intNumber.Sign() > 0 result is 1.

◆ ToString()

proto external string int.ToString ( int  len = -1)

Integer to string with fixed length, padded with zeroes.

Parameters
lenint fixed length
int num = 123;
string s1 = num.ToString(5);
string s2 = num.ToString();
Print(s1);
Print(s2);
>> s1 = '00123'
>> s2 = '123'
proto external string ToString(int len=-1)
Integer to string with fixed length, padded with zeroes.

Member Data Documentation

◆ MAX

const int int.MAX = 2147483647
static

◆ MIN

const int int.MIN = -2147483648
static

The documentation for this interface was generated from the following file: