[ad_1]
str.replace("\\D", "");
will remove all non-digit characters from the string, then you can just parse it:
Integer.parseInt(str);
[ad_2]
solved how to convert a String value 512m into integer value 512? [closed]
[ad_1]
str.replace("\\D", "");
will remove all non-digit characters from the string, then you can just parse it:
Integer.parseInt(str);
[ad_2]
solved how to convert a String value 512m into integer value 512? [closed]