G
ganggang3ster
Is there a method in String, Integer, or other classes that will
return the
integer within a string like:
int a = ClassName.method("I have 7 peanuts");
System.out.print(a);
Output:
7
I have an uneasy feeling that the answer may be no, and my current
solution uses regular expressions
Thanks!
return the
integer within a string like:
int a = ClassName.method("I have 7 peanuts");
System.out.print(a);
Output:
7
I have an uneasy feeling that the answer may be no, and my current
solution uses regular expressions
Thanks!