using char to extract integer numbers from a list - [UnityScript]

I basically have an XML Parser I bought from the Asset store. It stores the values it grabs from the XML file as char ( I think ).

Somebody on the forum helped me in my post regarding XML and reading the values but I have tried to use char to convert these values to integers. The numbers stored in the list consist of numbers only.

The person used charAt to convert them but I haven’t found an equivalent for UNITYSCRIPT.

So basically if I had a list full of numbers as char how would I then convert them to integers?

Thanks!

Here are a couple of methods depending on whether you want to treat the character as a ‘byte’ with or if you are you looking for the a string convert (i.e. ‘2’ would equal 2).

var arch : char[] = ["0"[0], "1"[0], "2"[0], "3"[0]];

function Start () {

	var i : int = System.Convert.ToInt32(arch[2]);
	Debug.Log("i: " + i);
	
	var j : int = char.GetNumericValue(arch[2]);
	Debug.Log("j: " + j);
}