I have a String that represents an integer value and would like to convert it to an int. Is there a groovy equivalent of Java\'s Integer.pars
String
int
Integer.pars
Well, Groovy accepts the Java form just fine. If you are asking if there is a Groovier way, there is a way to go to Integer.
Integer
Both are shown here:
String s = "99" assert 99 == Integer.parseInt(s) Integer i = s as Integer assert 99 == i