Converting Strings to Floats!

The example code I find online never appears to work for anything Java related… Its hurting me…

So…

MyString = “64.645”

I want that, as a float?

Help me with float, i’m drowning here :slight_smile:

Have you tried:

var myFloat:float = System.Convert.ToDouble (“123.456”);

The only downside is I’m not sure what the overhead is on a iPhone.

Microsoft’s online docs are very valuable.

Cheers.

float.Parse(string) should do the trick.

parseFloat and parseInt were the way to go :slight_smile: