Skip to content

HeliScript - Casting

Type Casts

int(float)

int int(float)

Converts float value to integer.

float(int)

float float(int)

Converts integer to float value.

bool(int)

bool bool(int)

Converts integer to boolean value.

0 will be converted to true, while other values will be converted to false.

string(int)

string string(int)

Converts integer to string.

string(float)

string string(float)

Converts float value to string.


string methods

ToInt()

public int ToInt()

Convert a string to an integer value. Returns 0 if the conversion fails.

ToFloat()

public float ToFloat()

Convert a string to a float value. Returns 0 if the conversion fails.