- Added realracing3-community.apk (71.57 MB) - Removed 32-bit support (armeabi-v7a) - Only includes arm64-v8a libraries - Decompiled source code included - Added README-community.md with analysis
122 lines
3.5 KiB
Java
122 lines
3.5 KiB
Java
package kotlin.text;
|
|
|
|
import com.mbridge.msdk.playercommon.exoplayer2.C;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* loaded from: classes5.dex */
|
|
public abstract class StringsKt__StringNumberConversionsKt extends StringsKt__StringNumberConversionsJVMKt {
|
|
public static Integer toIntOrNull(String str) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
return toIntOrNull(str, 10);
|
|
}
|
|
|
|
public static final Integer toIntOrNull(String str, int i) {
|
|
boolean z;
|
|
int i2;
|
|
int i3;
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
CharsKt__CharJVMKt.checkRadix(i);
|
|
int length = str.length();
|
|
if (length == 0) {
|
|
return null;
|
|
}
|
|
int i4 = 0;
|
|
char charAt = str.charAt(0);
|
|
int i5 = -2147483647;
|
|
if (Intrinsics.compare((int) charAt, 48) < 0) {
|
|
i2 = 1;
|
|
if (length == 1) {
|
|
return null;
|
|
}
|
|
if (charAt == '-') {
|
|
i5 = Integer.MIN_VALUE;
|
|
z = true;
|
|
} else {
|
|
if (charAt != '+') {
|
|
return null;
|
|
}
|
|
z = false;
|
|
}
|
|
} else {
|
|
z = false;
|
|
i2 = 0;
|
|
}
|
|
int i6 = -59652323;
|
|
while (i2 < length) {
|
|
int digitOf = CharsKt__CharJVMKt.digitOf(str.charAt(i2), i);
|
|
if (digitOf < 0) {
|
|
return null;
|
|
}
|
|
if ((i4 < i6 && (i6 != -59652323 || i4 < (i6 = i5 / i))) || (i3 = i4 * i) < i5 + digitOf) {
|
|
return null;
|
|
}
|
|
i4 = i3 - digitOf;
|
|
i2++;
|
|
}
|
|
return z ? Integer.valueOf(i4) : Integer.valueOf(-i4);
|
|
}
|
|
|
|
public static Long toLongOrNull(String str) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
return toLongOrNull(str, 10);
|
|
}
|
|
|
|
public static final Long toLongOrNull(String str, int i) {
|
|
boolean z;
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
CharsKt__CharJVMKt.checkRadix(i);
|
|
int length = str.length();
|
|
if (length == 0) {
|
|
return null;
|
|
}
|
|
int i2 = 0;
|
|
char charAt = str.charAt(0);
|
|
int compare = Intrinsics.compare((int) charAt, 48);
|
|
long j = C.TIME_UNSET;
|
|
if (compare < 0) {
|
|
z = true;
|
|
if (length == 1) {
|
|
return null;
|
|
}
|
|
if (charAt == '-') {
|
|
j = Long.MIN_VALUE;
|
|
i2 = 1;
|
|
} else {
|
|
if (charAt != '+') {
|
|
return null;
|
|
}
|
|
z = false;
|
|
i2 = 1;
|
|
}
|
|
} else {
|
|
z = false;
|
|
}
|
|
long j2 = -256204778801521550L;
|
|
long j3 = 0;
|
|
long j4 = -256204778801521550L;
|
|
while (i2 < length) {
|
|
int digitOf = CharsKt__CharJVMKt.digitOf(str.charAt(i2), i);
|
|
if (digitOf < 0) {
|
|
return null;
|
|
}
|
|
if (j3 < j4) {
|
|
if (j4 == j2) {
|
|
j4 = j / i;
|
|
if (j3 < j4) {
|
|
}
|
|
}
|
|
return null;
|
|
}
|
|
long j5 = j3 * i;
|
|
long j6 = digitOf;
|
|
if (j5 < j + j6) {
|
|
return null;
|
|
}
|
|
j3 = j5 - j6;
|
|
i2++;
|
|
j2 = -256204778801521550L;
|
|
}
|
|
return z ? Long.valueOf(j3) : Long.valueOf(-j3);
|
|
}
|
|
}
|