Converting a string to Num. Currently I have made a function for it, but it would have been easier converting if it had been available as a String method.

external sync function parseInt(num : String) : Num


lib.unilib.parseInt = function(num) {
return parseInt(num);
};

Submitted by Terje Pedersen on 14 April 2011 at 12:52

On 14 April 2011 at 13:11 Zef Hemel commented:

Is a global function ok? Has been there for a long time: parseNum


On 14 April 2011 at 13:15 Terje Pedersen commented:

sure but easier if lets say .toNum() had been there to just select it when you type “.”


On 15 April 2011 at 08:35 Terje Pedersen commented:

But on the other end I have to look more at the documentation ;-)


On 19 April 2011 at 13:41 Zef Hemel closed this issue.

Log in to post comments