mirror of
https://github.com/VibedByKaKi/alexandroid.git
synced 2026-12-05 11:59:30 +01:00
37 lines
1.1 KiB
Java
37 lines
1.1 KiB
Java
package com.google.common.primitives;
|
|
|
|
import com.google.common.annotations.GwtCompatible;
|
|
import org.json.XML$$ExternalSyntheticBUOutline0;
|
|
|
|
/* compiled from: r8-map-id-b9432e0f623b4a4bff4ba50a8a24c4aafad2c1e11092747b9fb5e6a22af5a940 */
|
|
@GwtCompatible
|
|
/* loaded from: classes8.dex */
|
|
final class ParseRequest {
|
|
final int radix;
|
|
final String rawValue;
|
|
|
|
private ParseRequest(String str, int i) {
|
|
this.rawValue = str;
|
|
this.radix = i;
|
|
}
|
|
|
|
public static ParseRequest fromString(String str) {
|
|
if (str.length() == 0) {
|
|
XML$$ExternalSyntheticBUOutline0.m$2("empty string");
|
|
return null;
|
|
}
|
|
char charAt = str.charAt(0);
|
|
int i = 16;
|
|
if (str.startsWith("0x") || str.startsWith("0X")) {
|
|
str = str.substring(2);
|
|
} else if (charAt == '#') {
|
|
str = str.substring(1);
|
|
} else if (charAt != '0' || str.length() <= 1) {
|
|
i = 10;
|
|
} else {
|
|
str = str.substring(1);
|
|
i = 8;
|
|
}
|
|
return new ParseRequest(str, i);
|
|
}
|
|
}
|