|
@@ -37,15 +37,27 @@ public class AppendUtils {
|
|
|
}
|
|
|
|
|
|
public static int stringSplit(String miles) {
|
|
|
+ int substring=0;
|
|
|
String[] split = miles.split("\\+");
|
|
|
if (split.length>1) {
|
|
|
- String substring1 = split[0].substring(1);
|
|
|
+ for (char c : split[0].toCharArray()) {
|
|
|
+ if (c == 'K'||c=='k') {
|
|
|
+ substring++;
|
|
|
+ }
|
|
|
+ }
|
|
|
int number = Integer.parseInt(split[1]);
|
|
|
- int integer = Integer.parseInt(substring1);
|
|
|
+ int integer = Integer.parseInt(split[0].substring(substring));
|
|
|
integer=integer*1000;
|
|
|
return integer + number;
|
|
|
}else {
|
|
|
- return Integer.parseInt(miles);
|
|
|
+ for (char c : miles.toCharArray()) {
|
|
|
+ if (c == 'K'||c=='k') {
|
|
|
+ substring++;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ int integer = Integer.parseInt(miles.substring(substring));
|
|
|
+ integer=integer*1000;
|
|
|
+ return integer;
|
|
|
}
|
|
|
}
|
|
|
}
|