Write a function that takes a string as an input and outputs an integer, e.g. turning "1234" into 1234.
Anónimo
public static in strToInt(String str){ int i=0; num=0; boolean isNeg=false; int len=str.lenght(); if(str.charAt(0)=='-'){ isNeg=true; i=1; } while(i