47 lines
1.6 KiB
Java
47 lines
1.6 KiB
Java
|
package o;
|
||
|
|
||
|
import java.text.NumberFormat;
|
||
|
import java.util.List;
|
||
|
|
||
|
/* renamed from: o.gH, reason: case insensitive filesystem */
|
||
|
/* loaded from: classes3.dex */
|
||
|
public final class C14813gH {
|
||
|
public static final String a(String str) {
|
||
|
if (str == null) {
|
||
|
return null;
|
||
|
}
|
||
|
try {
|
||
|
String str2 = str;
|
||
|
C14957gcv.e(str2, "");
|
||
|
if (gdZ.a((CharSequence) str2, '.', 0, false) < 0) {
|
||
|
return str;
|
||
|
}
|
||
|
String str3 = str;
|
||
|
char[] cArr = {'.'};
|
||
|
C14957gcv.e(str3, "");
|
||
|
C14957gcv.e(cArr, "");
|
||
|
List<String> c = C15017gel.c((CharSequence) str3, String.valueOf(cArr[0]), false, 0);
|
||
|
String str4 = c.get(0);
|
||
|
Double valueOf = Double.valueOf(Integer.parseInt(str4));
|
||
|
String format = ((NumberFormat) C6583cXR.c(new Object[]{0}, -1969602709, 1969602717, 0)).format(valueOf != null ? valueOf.doubleValue() : 0.0d);
|
||
|
C14957gcv.c((Object) format, "");
|
||
|
String str5 = c.get(1);
|
||
|
if (gdZ.c((CharSequence) str4) & (!gdZ.c((CharSequence) format))) {
|
||
|
StringBuilder sb = new StringBuilder("-");
|
||
|
sb.append(format);
|
||
|
sb.append(".");
|
||
|
sb.append(str5);
|
||
|
return sb.toString();
|
||
|
}
|
||
|
StringBuilder sb2 = new StringBuilder();
|
||
|
sb2.append(format);
|
||
|
sb2.append(".");
|
||
|
sb2.append(str5);
|
||
|
return sb2.toString();
|
||
|
} catch (NumberFormatException e) {
|
||
|
guQ.d(e, "formatDoubleString error", new Object[0]);
|
||
|
return str;
|
||
|
}
|
||
|
}
|
||
|
}
|