Files
rr3-apk/decompiled-community/sources/com/mbridge/msdk/thrid/okio/Utf8.java
Daniel Elliott c080f0d97f Add Discord community version (64-bit only)
- 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
2026-02-18 15:48:36 -08:00

54 lines
1.5 KiB
Java

package com.mbridge.msdk.thrid.okio;
/* loaded from: classes4.dex */
public final class Utf8 {
private Utf8() {
}
public static long size(String str) {
return size(str, 0, str.length());
}
public static long size(String str, int i, int i2) {
long j;
if (str == null) {
throw new IllegalArgumentException("string == null");
}
if (i < 0) {
throw new IllegalArgumentException("beginIndex < 0: " + i);
}
if (i2 < i) {
throw new IllegalArgumentException("endIndex < beginIndex: " + i2 + " < " + i);
}
if (i2 > str.length()) {
throw new IllegalArgumentException("endIndex > string.length: " + i2 + " > " + str.length());
}
long j2 = 0;
while (i < i2) {
char charAt = str.charAt(i);
if (charAt < 128) {
j2++;
} else {
if (charAt < 2048) {
j = 2;
} else if (charAt < 55296 || charAt > 57343) {
j = 3;
} else {
int i3 = i + 1;
char charAt2 = i3 < i2 ? str.charAt(i3) : (char) 0;
if (charAt > 56319 || charAt2 < 56320 || charAt2 > 57343) {
j2++;
i = i3;
} else {
j2 += 4;
i += 2;
}
}
j2 += j;
}
i++;
}
return j2;
}
}