String to int?

I’m trying to convert a String to an int, but it won’t work. The code I’m using resembles:

var a = 1;
var b = Integer.parseInt(a);

Anybody know how to do this? Thanks in advance for your help!

Check out a topic I started a while back asking this same question:

http://forum.otee.dk/viewtopic.php?t=663&highlight=string+int

Thanks!