how to handle string as a number equivalent to Integer.parseInt or Float.parseFloat as in Java. Thanks.