Hello. Sorry for the very basic question: In the command line options (chuck:2:3) the me. function retrieves 2 & 3 like strings, but i want ints. Any function for transforming like a.toString() but a.toInt() ? Thanks,
Hi Miquel,
Look in the manual at the api reference under the Std namespace.
There you will find many useful functions.
One such function is Std.atoi(); which takes a string and returns an
integer representation of the string. It's short for ASCII to
INTEGER.
<<< Std.atoi("3") >>>;
prints
3 : (int)
Good luck!
Mike
2010/8/3 miquel parera
Hello.
Sorry for the very basic question:
In the command line options (chuck:2:3) the me. function retrieves 2 & 3 like strings, but i want ints.
Any function for transforming like a.toString() but a.toInt() ?
Thanks, _______________________________________________ chuck-users mailing list chuck-users@lists.cs.princeton.edu https://lists.cs.princeton.edu/mailman/listinfo/chuck-users
participants (2)
-
mike clemow
-
miquel parera