* Decompile and recreate Soul Browser v1.4.85 with APK CI builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix CI build: include bundled google.jks and remove PR trigger The apktool build failed in CI because app/unknown/.../google.jks was excluded by the *.jks gitignore rule. Whitelist app-bundled JKS files and commit the missing resource. Also remove the redundant pull_request workflow trigger. Co-authored-by: KaKi87 <KaKi87@pm.me> * Change package ID to com.github.kaki87.soulbrowser Rename the application ID so the rebuilt APK can be installed alongside the original Soul Browser from Google Play. - Update AndroidManifest package, permissions, providers, and actions - Update R class references in smali (com/github/kaki87/soulbrowser/R) - Update shortcuts.xml targetPackage - Rename app label to "Soul Rebuild" for easy identification Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install compatibility: remove split APK metadata and bundle native libs The rebuilt APK still declared requiredSplitTypes and Play Store split metadata, causing Android to reject standalone installs as incompatible. - Remove requiredSplitTypes and split-related manifest meta-data - Merge native libs from all ABI splits with uncompressed storage - Page-align before signing for extractNativeLibs=false - Add .so to apktool doNotCompress list Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix install failure: use apksigner v2/v3 and bundle arm64 native libs Target SDK 36 requires APK Signature Scheme v2+, but jarsigner only produces v1 signatures, causing Android to reject the install. - Sign with apksigner (v1+v2+v3) instead of jarsigner - Add arm64-v8a native libraries from universal Soul Browser 1.4.79 - Set extractNativeLibs=true for reliable sideload installs - Commit stable debug keystore for consistent signatures across builds Co-authored-by: KaKi87 <KaKi87@pm.me> * Add committed debug keystore for consistent APK signatures Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix startup crash: use original classes2.dex desugar libraries Apktool recompiles smali_classes2 into a broken classes2.dex, causing ClassNotFoundException for j$.com.android.tools.r8.a at ML Kit init. Inject the original classes2.dex (Java 8+ desugar libs) after apktool build instead of using the recompiled version. Co-authored-by: KaKi87 <KaKi87@pm.me> * Fix missing drawable resources from density split APKs The base APK is an app bundle module; density-specific drawables like seek_thumb_nor_b live in config.xhdpi.apk and were missing after rebuild, causing Resources$NotFoundException at runtime. - Merge non-9-patch resources from split APKs before apktool build - Sync public.xml IDs from R smali only when backing files exist - Add 713 density-specific resource IDs to public.xml Co-authored-by: KaKi87 <KaKi87@pm.me> --------- Co-authored-by: Cursor Agent <cursoragent@cursor.com>
887 lines
46 KiB
Java
887 lines
46 KiB
Java
package kotlin.text;
|
|
|
|
import com.google.android.gms.ads.RequestConfiguration;
|
|
import java.nio.ByteBuffer;
|
|
import java.nio.CharBuffer;
|
|
import java.nio.charset.Charset;
|
|
import java.nio.charset.CharsetDecoder;
|
|
import java.nio.charset.CharsetEncoder;
|
|
import java.nio.charset.CodingErrorAction;
|
|
import java.util.Arrays;
|
|
import java.util.Comparator;
|
|
import java.util.List;
|
|
import java.util.Locale;
|
|
import java.util.regex.Pattern;
|
|
import kotlin.Deprecated;
|
|
import kotlin.DeprecatedSinceKotlin;
|
|
import kotlin.Metadata;
|
|
import kotlin.ReplaceWith;
|
|
import kotlin.SinceKotlin;
|
|
import kotlin.collections.AbstractList;
|
|
import kotlin.collections.ArraysKt;
|
|
import kotlin.internal.InlineOnly;
|
|
import kotlin.internal.LowPriorityInOverloadResolution;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
import kotlin.jvm.internal.SourceDebugExtension;
|
|
import kotlin.jvm.internal.StringCompanionObject;
|
|
import kotlin.ranges.RangesKt;
|
|
import org.jetbrains.annotations.NotNull;
|
|
import org.jetbrains.annotations.Nullable;
|
|
|
|
@Metadata(d1 = {"\u0000\u0080\u0001\n\u0000\n\u0002\u0010\b\n\u0002\u0010\u000e\n\u0000\n\u0002\u0010\f\n\u0002\b\u0004\n\u0002\u0010\u000b\n\u0002\b\r\n\u0002\u0010\u0019\n\u0002\b\u0004\n\u0002\u0010\u0012\n\u0002\b\u0006\n\u0002\u0010\u0011\n\u0002\u0010\u0000\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\n\u0002\u0010 \n\u0002\u0010\r\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u000b\n\u0002\u0018\u0002\n\u0002\b\u0002\n\u0002\u0010\u0015\n\u0000\n\u0002\u0018\u0002\n\u0000\n\u0002\u0018\u0002\n\u0002\b\u0016\n\u0002\u0018\u0002\n\u0002\u0018\u0002\n\u0002\b\u0003\u001a\u001d\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0001H\u0081\b\u001a\u001d\u0010\u0000\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0006\u001a\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u0001H\u0081\b\u001a\u001d\u0010\u0007\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0003\u001a\u00020\u00042\u0006\u0010\u0005\u001a\u00020\u0001H\u0081\b\u001a\u001d\u0010\u0007\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\u0006\u001a\u00020\u00022\u0006\u0010\u0005\u001a\u00020\u0001H\u0081\b\u001a \u0010\b\u001a\u00020\t*\u0004\u0018\u00010\u00022\b\u0010\n\u001a\u0004\u0018\u00010\u00022\b\b\u0002\u0010\u000b\u001a\u00020\t\u001a$\u0010\f\u001a\u00020\u0002*\u00020\u00022\u0006\u0010\r\u001a\u00020\u00042\u0006\u0010\u000e\u001a\u00020\u00042\b\b\u0002\u0010\u000b\u001a\u00020\t\u001a$\u0010\f\u001a\u00020\u0002*\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u00022\u0006\u0010\u0010\u001a\u00020\u00022\b\b\u0002\u0010\u000b\u001a\u00020\t\u001a$\u0010\u0011\u001a\u00020\u0002*\u00020\u00022\u0006\u0010\r\u001a\u00020\u00042\u0006\u0010\u000e\u001a\u00020\u00042\b\b\u0002\u0010\u000b\u001a\u00020\t\u001a$\u0010\u0011\u001a\u00020\u0002*\u00020\u00022\u0006\u0010\u000f\u001a\u00020\u00022\u0006\u0010\u0010\u001a\u00020\u00022\b\b\u0002\u0010\u000b\u001a\u00020\t\u001a\r\u0010\u0012\u001a\u00020\u0002*\u00020\u0002H\u0087\b\u001a\r\u0010\u0013\u001a\u00020\u0002*\u00020\u0002H\u0087\b\u001a\r\u0010\u0014\u001a\u00020\u0002*\u00020\u0002H\u0087\b\u001a\r\u0010\u0015\u001a\u00020\u0002*\u00020\u0002H\u0087\b\u001a\f\u0010\u0016\u001a\u00020\u0002*\u00020\u0017H\u0007\u001a \u0010\u0016\u001a\u00020\u0002*\u00020\u00172\b\b\u0002\u0010\u0018\u001a\u00020\u00012\b\b\u0002\u0010\u0019\u001a\u00020\u0001H\u0007\u001a \u0010\u001a\u001a\u00020\u0017*\u00020\u00022\b\b\u0002\u0010\u0018\u001a\u00020\u00012\b\b\u0002\u0010\u0019\u001a\u00020\u0001H\u0007\u001a\f\u0010\u001b\u001a\u00020\u0002*\u00020\u001cH\u0007\u001a*\u0010\u001b\u001a\u00020\u0002*\u00020\u001c2\b\b\u0002\u0010\u0018\u001a\u00020\u00012\b\b\u0002\u0010\u0019\u001a\u00020\u00012\b\b\u0002\u0010\u001d\u001a\u00020\tH\u0007\u001a\f\u0010\u001e\u001a\u00020\u001c*\u00020\u0002H\u0007\u001a*\u0010\u001e\u001a\u00020\u001c*\u00020\u00022\b\b\u0002\u0010\u0018\u001a\u00020\u00012\b\b\u0002\u0010\u0019\u001a\u00020\u00012\b\b\u0002\u0010\u001d\u001a\u00020\tH\u0007\u001a\r\u0010\u001a\u001a\u00020\u0017*\u00020\u0002H\u0087\b\u001a3\u0010\u001a\u001a\u00020\u0017*\u00020\u00022\u0006\u0010\u001f\u001a\u00020\u00172\b\b\u0002\u0010 \u001a\u00020\u00012\b\b\u0002\u0010\u0018\u001a\u00020\u00012\b\b\u0002\u0010\u0019\u001a\u00020\u0001H\u0087\b\u001a*\u0010!\u001a\u00020\u0002*\u00020\u00022\u0016\u0010\"\u001a\f\u0012\b\b\u0001\u0012\u0004\u0018\u00010$0#\"\u0004\u0018\u00010$H\u0087\b¢\u0006\u0002\u0010%\u001a2\u0010!\u001a\u00020\u0002*\u00020&2\u0006\u0010!\u001a\u00020\u00022\u0016\u0010\"\u001a\f\u0012\b\b\u0001\u0012\u0004\u0018\u00010$0#\"\u0004\u0018\u00010$H\u0087\b¢\u0006\u0002\u0010'\u001a4\u0010!\u001a\u00020\u0002*\u00020\u00022\b\u0010(\u001a\u0004\u0018\u00010)2\u0016\u0010\"\u001a\f\u0012\b\b\u0001\u0012\u0004\u0018\u00010$0#\"\u0004\u0018\u00010$H\u0087\b¢\u0006\u0002\u0010*\u001a<\u0010!\u001a\u00020\u0002*\u00020&2\b\u0010(\u001a\u0004\u0018\u00010)2\u0006\u0010!\u001a\u00020\u00022\u0016\u0010\"\u001a\f\u0012\b\b\u0001\u0012\u0004\u0018\u00010$0#\"\u0004\u0018\u00010$H\u0087\b¢\u0006\u0002\u0010+\u001a\"\u0010,\u001a\b\u0012\u0004\u0012\u00020\u00020-*\u00020.2\u0006\u0010/\u001a\u0002002\b\b\u0002\u00101\u001a\u00020\u0001\u001a\u0015\u00102\u001a\u00020\u0002*\u00020\u00022\u0006\u0010\u0018\u001a\u00020\u0001H\u0087\b\u001a\u001d\u00102\u001a\u00020\u0002*\u00020\u00022\u0006\u0010\u0018\u001a\u00020\u00012\u0006\u0010\u0019\u001a\u00020\u0001H\u0087\b\u001a\u001c\u00103\u001a\u00020\t*\u00020\u00022\u0006\u00104\u001a\u00020\u00022\b\b\u0002\u0010\u000b\u001a\u00020\t\u001a$\u00103\u001a\u00020\t*\u00020\u00022\u0006\u00104\u001a\u00020\u00022\u0006\u0010\u0018\u001a\u00020\u00012\b\b\u0002\u0010\u000b\u001a\u00020\t\u001a\u001c\u00105\u001a\u00020\t*\u00020\u00022\u0006\u00106\u001a\u00020\u00022\b\b\u0002\u0010\u000b\u001a\u00020\t\u001a)\u00107\u001a\u00020\u00022\u0006\u00108\u001a\u00020\u001c2\u0006\u00109\u001a\u00020\u00012\u0006\u0010:\u001a\u00020\u00012\u0006\u0010;\u001a\u00020<H\u0087\b\u001a\u0019\u00107\u001a\u00020\u00022\u0006\u00108\u001a\u00020\u001c2\u0006\u0010;\u001a\u00020<H\u0087\b\u001a!\u00107\u001a\u00020\u00022\u0006\u00108\u001a\u00020\u001c2\u0006\u00109\u001a\u00020\u00012\u0006\u0010:\u001a\u00020\u0001H\u0087\b\u001a\u0011\u00107\u001a\u00020\u00022\u0006\u00108\u001a\u00020\u001cH\u0087\b\u001a\u0011\u00107\u001a\u00020\u00022\u0006\u0010=\u001a\u00020\u0017H\u0087\b\u001a!\u00107\u001a\u00020\u00022\u0006\u0010=\u001a\u00020\u00172\u0006\u00109\u001a\u00020\u00012\u0006\u0010:\u001a\u00020\u0001H\u0087\b\u001a!\u00107\u001a\u00020\u00022\u0006\u0010>\u001a\u00020?2\u0006\u00109\u001a\u00020\u00012\u0006\u0010:\u001a\u00020\u0001H\u0087\b\u001a\u0011\u00107\u001a\u00020\u00022\u0006\u0010@\u001a\u00020AH\u0087\b\u001a\u0011\u00107\u001a\u00020\u00022\u0006\u0010B\u001a\u00020CH\u0087\b\u001a\u0015\u0010D\u001a\u00020\u0001*\u00020\u00022\u0006\u0010E\u001a\u00020\u0001H\u0087\b\u001a\u0015\u0010F\u001a\u00020\u0001*\u00020\u00022\u0006\u0010E\u001a\u00020\u0001H\u0087\b\u001a\u001d\u0010G\u001a\u00020\u0001*\u00020\u00022\u0006\u0010H\u001a\u00020\u00012\u0006\u0010\u0019\u001a\u00020\u0001H\u0087\b\u001a\u001c\u0010I\u001a\u00020\u0001*\u00020\u00022\u0006\u0010\n\u001a\u00020\u00022\b\b\u0002\u0010\u000b\u001a\u00020\t\u001a\u0015\u0010J\u001a\u00020\t*\u00020\u00022\u0006\u0010K\u001a\u00020.H\u0087\b\u001a\u0015\u0010J\u001a\u00020\t*\u00020\u00022\u0006\u0010B\u001a\u00020AH\u0087\b\u001a\u0019\u0010J\u001a\u00020\t*\u0004\u0018\u00010.2\b\u0010\n\u001a\u0004\u0018\u00010.H\u0087\u0004\u001a \u0010J\u001a\u00020\t*\u0004\u0018\u00010.2\b\u0010\n\u001a\u0004\u0018\u00010.2\u0006\u0010\u000b\u001a\u00020\tH\u0007\u001a\r\u0010L\u001a\u00020\u0002*\u00020\u0002H\u0087\b\u001a\u001d\u0010M\u001a\u00020\u0001*\u00020\u00022\u0006\u0010E\u001a\u00020\u00012\u0006\u0010N\u001a\u00020\u0001H\u0087\b\u001a4\u0010O\u001a\u00020\t*\u00020.2\u0006\u0010P\u001a\u00020\u00012\u0006\u0010\n\u001a\u00020.2\u0006\u0010Q\u001a\u00020\u00012\u0006\u0010:\u001a\u00020\u00012\b\b\u0002\u0010\u000b\u001a\u00020\t\u001a4\u0010O\u001a\u00020\t*\u00020\u00022\u0006\u0010P\u001a\u00020\u00012\u0006\u0010\n\u001a\u00020\u00022\u0006\u0010Q\u001a\u00020\u00012\u0006\u0010:\u001a\u00020\u00012\b\b\u0002\u0010\u000b\u001a\u00020\t\u001a\u0015\u0010\u0014\u001a\u00020\u0002*\u00020\u00022\u0006\u0010(\u001a\u00020)H\u0087\b\u001a\u0015\u0010\u0015\u001a\u00020\u0002*\u00020\u00022\u0006\u0010(\u001a\u00020)H\u0087\b\u001a\u0015\u0010\u0012\u001a\u00020\u0002*\u00020\u00022\u0006\u0010(\u001a\u00020)H\u0087\b\u001a\u0015\u0010\u0013\u001a\u00020\u0002*\u00020\u00022\u0006\u0010(\u001a\u00020)H\u0087\b\u001a\u0017\u0010R\u001a\u00020\u001c*\u00020\u00022\b\b\u0002\u0010;\u001a\u00020<H\u0087\b\u001a\u0017\u0010S\u001a\u000200*\u00020\u00022\b\b\u0002\u0010T\u001a\u00020\u0001H\u0087\b\u001a\f\u0010U\u001a\u00020\u0002*\u00020\u0002H\u0007\u001a\u0014\u0010U\u001a\u00020\u0002*\u00020\u00022\u0006\u0010(\u001a\u00020)H\u0007\u001a\f\u0010V\u001a\u00020\u0002*\u00020\u0002H\u0007\u001a\u0014\u0010V\u001a\u00020\u0002*\u00020\u00022\u0006\u0010(\u001a\u00020)H\u0007\u001a\u0012\u0010W\u001a\u00020\u0002*\u00020.2\u0006\u0010X\u001a\u00020\u0001\"%\u0010Y\u001a\u0012\u0012\u0004\u0012\u00020\u00020Zj\b\u0012\u0004\u0012\u00020\u0002`[*\u00020&8F¢\u0006\u0006\u001a\u0004\b\\\u0010]¨\u0006^"}, d2 = {"nativeIndexOf", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "ch", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "fromIndex", "str", "nativeLastIndexOf", "equals", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "other", "ignoreCase", "replace", "oldChar", "newChar", "oldValue", "newValue", "replaceFirst", "toUpperCase", "uppercase", "toLowerCase", "lowercase", "concatToString", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "startIndex", "endIndex", "toCharArray", "decodeToString", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "throwOnInvalidSequence", "encodeToByteArray", "destination", "destinationOffset", "format", "args", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "(Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;", "Lkotlin/String$Companion;", "(Lkotlin/jvm/internal/StringCompanionObject;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;", "locale", "Ljava/util/Locale;", "(Ljava/lang/String;Ljava/util/Locale;[Ljava/lang/Object;)Ljava/lang/String;", "(Lkotlin/jvm/internal/StringCompanionObject;Ljava/util/Locale;Ljava/lang/String;[Ljava/lang/Object;)Ljava/lang/String;", "split", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "regex", "Ljava/util/regex/Pattern;", "limit", "substring", "startsWith", "prefix", "endsWith", "suffix", "String", "bytes", "offset", "length", "charset", "Ljava/nio/charset/Charset;", "chars", "codePoints", RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED, "stringBuffer", "Ljava/lang/StringBuffer;", "stringBuilder", "Ljava/lang/StringBuilder;", "codePointAt", "index", "codePointBefore", "codePointCount", "beginIndex", "compareTo", "contentEquals", "charSequence", "intern", "offsetByCodePoints", "codePointOffset", "regionMatches", "thisOffset", "otherOffset", "toByteArray", "toPattern", "flags", "capitalize", "decapitalize", "repeat", "n", "CASE_INSENSITIVE_ORDER", "Ljava/util/Comparator;", "Lkotlin/Comparator;", "getCASE_INSENSITIVE_ORDER", "(Lkotlin/jvm/internal/StringCompanionObject;)Ljava/util/Comparator;", "kotlin-stdlib"}, k = 5, mv = {2, 2, 0}, xi = 49, xs = "kotlin/text/StringsKt")
|
|
@SourceDebugExtension({"SMAP\nStringsJVM.kt\nKotlin\n*S Kotlin\n*F\n+ 1 StringsJVM.kt\nkotlin/text/StringsKt__StringsJVMKt\n+ 2 _Strings.kt\nkotlin/text/StringsKt___StringsKt\n+ 3 fake.kt\nkotlin/jvm/internal/FakeKt\n*L\n1#1,885:1\n1179#2,2:886\n1#3:888\n*S KotlinDebug\n*F\n+ 1 StringsJVM.kt\nkotlin/text/StringsKt__StringsJVMKt\n*L\n73#1:886,2\n*E\n"})
|
|
/* loaded from: classes4.dex */
|
|
public class StringsKt__StringsJVMKt extends StringsKt__StringNumberConversionsKt {
|
|
@InlineOnly
|
|
private static final String String(byte[] bytes, int i, int i2, Charset charset) {
|
|
Intrinsics.checkNotNullParameter(bytes, "bytes");
|
|
Intrinsics.checkNotNullParameter(charset, "charset");
|
|
return new String(bytes, i, i2, charset);
|
|
}
|
|
|
|
@Deprecated(message = "Use replaceFirstChar instead.", replaceWith = @ReplaceWith(expression = "replaceFirstChar { if (it.isLowerCase()) it.titlecase(Locale.getDefault()) else it.toString() }", imports = {"java.util.Locale"}))
|
|
@DeprecatedSinceKotlin(warningSince = "1.5")
|
|
@NotNull
|
|
public static final String capitalize(@NotNull String str) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Locale locale = Locale.getDefault();
|
|
Intrinsics.checkNotNullExpressionValue(locale, "getDefault(...)");
|
|
return capitalize(str, locale);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final int codePointAt(String str, int i) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
return str.codePointAt(i);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final int codePointBefore(String str, int i) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
return str.codePointBefore(i);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final int codePointCount(String str, int i, int i2) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
return str.codePointCount(i, i2);
|
|
}
|
|
|
|
public static final int compareTo(@NotNull String str, @NotNull String other, boolean z) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(other, "other");
|
|
if (z) {
|
|
return str.compareToIgnoreCase(other);
|
|
}
|
|
return str.compareTo(other);
|
|
}
|
|
|
|
public static /* synthetic */ int compareTo$default(String str, String str2, boolean z, int i, Object obj) {
|
|
if ((i & 2) != 0) {
|
|
z = false;
|
|
}
|
|
return compareTo(str, str2, z);
|
|
}
|
|
|
|
@SinceKotlin(version = "1.4")
|
|
@NotNull
|
|
public static String concatToString(@NotNull char[] cArr) {
|
|
Intrinsics.checkNotNullParameter(cArr, "<this>");
|
|
return new String(cArr);
|
|
}
|
|
|
|
public static /* synthetic */ String concatToString$default(char[] cArr, int i, int i2, int i3, Object obj) {
|
|
if ((i3 & 1) != 0) {
|
|
i = 0;
|
|
}
|
|
if ((i3 & 2) != 0) {
|
|
i2 = cArr.length;
|
|
}
|
|
return concatToString(cArr, i, i2);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final boolean contentEquals(String str, CharSequence charSequence) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(charSequence, "charSequence");
|
|
return str.contentEquals(charSequence);
|
|
}
|
|
|
|
@Deprecated(message = "Use replaceFirstChar instead.", replaceWith = @ReplaceWith(expression = "replaceFirstChar { it.lowercase(Locale.getDefault()) }", imports = {"java.util.Locale"}))
|
|
@DeprecatedSinceKotlin(warningSince = "1.5")
|
|
@NotNull
|
|
public static final String decapitalize(@NotNull String str) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
if (str.length() <= 0 || Character.isLowerCase(str.charAt(0))) {
|
|
return str;
|
|
}
|
|
StringBuilder sb = new StringBuilder();
|
|
String substring = str.substring(0, 1);
|
|
Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
|
|
Locale locale = Locale.getDefault();
|
|
Intrinsics.checkNotNullExpressionValue(locale, "getDefault(...)");
|
|
Intrinsics.checkNotNull(substring, "null cannot be cast to non-null type java.lang.String");
|
|
String lowerCase = substring.toLowerCase(locale);
|
|
Intrinsics.checkNotNullExpressionValue(lowerCase, "toLowerCase(...)");
|
|
sb.append(lowerCase);
|
|
String substring2 = str.substring(1);
|
|
Intrinsics.checkNotNullExpressionValue(substring2, "substring(...)");
|
|
sb.append(substring2);
|
|
return sb.toString();
|
|
}
|
|
|
|
@SinceKotlin(version = "1.4")
|
|
@NotNull
|
|
public static String decodeToString(@NotNull byte[] bArr) {
|
|
Intrinsics.checkNotNullParameter(bArr, "<this>");
|
|
return new String(bArr, Charsets.UTF_8);
|
|
}
|
|
|
|
public static /* synthetic */ String decodeToString$default(byte[] bArr, int i, int i2, boolean z, int i3, Object obj) {
|
|
if ((i3 & 1) != 0) {
|
|
i = 0;
|
|
}
|
|
if ((i3 & 2) != 0) {
|
|
i2 = bArr.length;
|
|
}
|
|
if ((i3 & 4) != 0) {
|
|
z = false;
|
|
}
|
|
return decodeToString(bArr, i, i2, z);
|
|
}
|
|
|
|
@SinceKotlin(version = "1.4")
|
|
@NotNull
|
|
public static final byte[] encodeToByteArray(@NotNull String str) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
byte[] bytes = str.getBytes(Charsets.UTF_8);
|
|
Intrinsics.checkNotNullExpressionValue(bytes, "getBytes(...)");
|
|
return bytes;
|
|
}
|
|
|
|
public static /* synthetic */ byte[] encodeToByteArray$default(String str, int i, int i2, boolean z, int i3, Object obj) {
|
|
if ((i3 & 1) != 0) {
|
|
i = 0;
|
|
}
|
|
if ((i3 & 2) != 0) {
|
|
i2 = str.length();
|
|
}
|
|
if ((i3 & 4) != 0) {
|
|
z = false;
|
|
}
|
|
return encodeToByteArray(str, i, i2, z);
|
|
}
|
|
|
|
public static boolean endsWith(@NotNull String str, @NotNull String suffix, boolean z) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(suffix, "suffix");
|
|
if (!z) {
|
|
return str.endsWith(suffix);
|
|
}
|
|
return regionMatches(str, str.length() - suffix.length(), suffix, 0, suffix.length(), true);
|
|
}
|
|
|
|
public static /* synthetic */ boolean endsWith$default(String str, String str2, boolean z, int i, Object obj) {
|
|
if ((i & 2) != 0) {
|
|
z = false;
|
|
}
|
|
return endsWith(str, str2, z);
|
|
}
|
|
|
|
public static boolean equals(@Nullable String str, @Nullable String str2, boolean z) {
|
|
if (str == null) {
|
|
if (str2 == null) {
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
if (!z) {
|
|
return str.equals(str2);
|
|
}
|
|
return str.equalsIgnoreCase(str2);
|
|
}
|
|
|
|
public static /* synthetic */ boolean equals$default(String str, String str2, boolean z, int i, Object obj) {
|
|
if ((i & 2) != 0) {
|
|
z = false;
|
|
}
|
|
return equals(str, str2, z);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final String format(String str, Object... args) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(args, "args");
|
|
String format = String.format(str, Arrays.copyOf(args, args.length));
|
|
Intrinsics.checkNotNullExpressionValue(format, "format(...)");
|
|
return format;
|
|
}
|
|
|
|
@NotNull
|
|
public static Comparator<String> getCASE_INSENSITIVE_ORDER(@NotNull StringCompanionObject stringCompanionObject) {
|
|
Intrinsics.checkNotNullParameter(stringCompanionObject, "<this>");
|
|
Comparator<String> CASE_INSENSITIVE_ORDER = String.CASE_INSENSITIVE_ORDER;
|
|
Intrinsics.checkNotNullExpressionValue(CASE_INSENSITIVE_ORDER, "CASE_INSENSITIVE_ORDER");
|
|
return CASE_INSENSITIVE_ORDER;
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final String intern(String str) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
String intern = str.intern();
|
|
Intrinsics.checkNotNullExpressionValue(intern, "intern(...)");
|
|
return intern;
|
|
}
|
|
|
|
@SinceKotlin(version = "1.5")
|
|
@InlineOnly
|
|
private static final String lowercase(String str) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
String lowerCase = str.toLowerCase(Locale.ROOT);
|
|
Intrinsics.checkNotNullExpressionValue(lowerCase, "toLowerCase(...)");
|
|
return lowerCase;
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final int nativeIndexOf(String str, char c2, int i) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
return str.indexOf(c2, i);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final int nativeLastIndexOf(String str, char c2, int i) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
return str.lastIndexOf(c2, i);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final int offsetByCodePoints(String str, int i, int i2) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
return str.offsetByCodePoints(i, i2);
|
|
}
|
|
|
|
public static final boolean regionMatches(@NotNull CharSequence charSequence, int i, @NotNull CharSequence other, int i2, int i3, boolean z) {
|
|
Intrinsics.checkNotNullParameter(charSequence, "<this>");
|
|
Intrinsics.checkNotNullParameter(other, "other");
|
|
if ((charSequence instanceof String) && (other instanceof String)) {
|
|
return regionMatches((String) charSequence, i, (String) other, i2, i3, z);
|
|
}
|
|
return StringsKt__StringsKt.regionMatchesImpl(charSequence, i, other, i2, i3, z);
|
|
}
|
|
|
|
public static /* synthetic */ boolean regionMatches$default(CharSequence charSequence, int i, CharSequence charSequence2, int i2, int i3, boolean z, int i4, Object obj) {
|
|
if ((i4 & 16) != 0) {
|
|
z = false;
|
|
}
|
|
return regionMatches(charSequence, i, charSequence2, i2, i3, z);
|
|
}
|
|
|
|
@NotNull
|
|
public static String repeat(@NotNull CharSequence charSequence, int i) {
|
|
Intrinsics.checkNotNullParameter(charSequence, "<this>");
|
|
if (i >= 0) {
|
|
if (i == 0) {
|
|
return RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED;
|
|
}
|
|
int i2 = 1;
|
|
if (i != 1) {
|
|
int length = charSequence.length();
|
|
if (length == 0) {
|
|
return RequestConfiguration.MAX_AD_CONTENT_RATING_UNSPECIFIED;
|
|
}
|
|
if (length != 1) {
|
|
StringBuilder sb = new StringBuilder(charSequence.length() * i);
|
|
if (1 <= i) {
|
|
while (true) {
|
|
sb.append(charSequence);
|
|
if (i2 == i) {
|
|
break;
|
|
}
|
|
i2++;
|
|
}
|
|
}
|
|
String sb2 = sb.toString();
|
|
Intrinsics.checkNotNull(sb2);
|
|
return sb2;
|
|
}
|
|
char charAt = charSequence.charAt(0);
|
|
char[] cArr = new char[i];
|
|
for (int i3 = 0; i3 < i; i3++) {
|
|
cArr[i3] = charAt;
|
|
}
|
|
return new String(cArr);
|
|
}
|
|
return charSequence.toString();
|
|
}
|
|
throw new IllegalArgumentException(com.mycompany.app.dialog.a.l("Count 'n' must be non-negative, but was ", i, '.').toString());
|
|
}
|
|
|
|
@NotNull
|
|
public static final String replace(@NotNull String str, char c2, char c3, boolean z) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
if (!z) {
|
|
String replace = str.replace(c2, c3);
|
|
Intrinsics.checkNotNullExpressionValue(replace, "replace(...)");
|
|
return replace;
|
|
}
|
|
StringBuilder sb = new StringBuilder(str.length());
|
|
for (int i = 0; i < str.length(); i++) {
|
|
char charAt = str.charAt(i);
|
|
if (CharsKt__CharKt.equals(charAt, c2, z)) {
|
|
charAt = c3;
|
|
}
|
|
sb.append(charAt);
|
|
}
|
|
return sb.toString();
|
|
}
|
|
|
|
public static /* synthetic */ String replace$default(String str, char c2, char c3, boolean z, int i, Object obj) {
|
|
if ((i & 4) != 0) {
|
|
z = false;
|
|
}
|
|
return replace(str, c2, c3, z);
|
|
}
|
|
|
|
@NotNull
|
|
public static final String replaceFirst(@NotNull String str, char c2, char c3, boolean z) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
int indexOf$default = StringsKt__StringsKt.indexOf$default(str, c2, 0, z, 2, (Object) null);
|
|
return indexOf$default < 0 ? str : StringsKt__StringsKt.replaceRange((CharSequence) str, indexOf$default, indexOf$default + 1, (CharSequence) String.valueOf(c3)).toString();
|
|
}
|
|
|
|
public static /* synthetic */ String replaceFirst$default(String str, char c2, char c3, boolean z, int i, Object obj) {
|
|
if ((i & 4) != 0) {
|
|
z = false;
|
|
}
|
|
return replaceFirst(str, c2, c3, z);
|
|
}
|
|
|
|
@NotNull
|
|
public static final List<String> split(@NotNull CharSequence charSequence, @NotNull Pattern regex, int i) {
|
|
Intrinsics.checkNotNullParameter(charSequence, "<this>");
|
|
Intrinsics.checkNotNullParameter(regex, "regex");
|
|
StringsKt__StringsKt.requireNonNegativeLimit(i);
|
|
if (i == 0) {
|
|
i = -1;
|
|
}
|
|
String[] split2 = regex.split(charSequence, i);
|
|
Intrinsics.checkNotNullExpressionValue(split2, "split(...)");
|
|
return ArraysKt.asList(split2);
|
|
}
|
|
|
|
public static /* synthetic */ List split$default(CharSequence charSequence, Pattern pattern, int i, int i2, Object obj) {
|
|
if ((i2 & 2) != 0) {
|
|
i = 0;
|
|
}
|
|
return split(charSequence, pattern, i);
|
|
}
|
|
|
|
public static boolean startsWith(@NotNull String str, @NotNull String prefix, boolean z) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(prefix, "prefix");
|
|
if (!z) {
|
|
return str.startsWith(prefix);
|
|
}
|
|
return regionMatches(str, 0, prefix, 0, prefix.length(), z);
|
|
}
|
|
|
|
public static /* synthetic */ boolean startsWith$default(String str, String str2, boolean z, int i, Object obj) {
|
|
if ((i & 2) != 0) {
|
|
z = false;
|
|
}
|
|
return startsWith(str, str2, z);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final String substring(String str, int i) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
String substring = str.substring(i);
|
|
Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
|
|
return substring;
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final byte[] toByteArray(String str, Charset charset) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(charset, "charset");
|
|
byte[] bytes = str.getBytes(charset);
|
|
Intrinsics.checkNotNullExpressionValue(bytes, "getBytes(...)");
|
|
return bytes;
|
|
}
|
|
|
|
public static /* synthetic */ byte[] toByteArray$default(String str, Charset charset, int i, Object obj) {
|
|
if ((i & 1) != 0) {
|
|
charset = Charsets.UTF_8;
|
|
}
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(charset, "charset");
|
|
byte[] bytes = str.getBytes(charset);
|
|
Intrinsics.checkNotNullExpressionValue(bytes, "getBytes(...)");
|
|
return bytes;
|
|
}
|
|
|
|
@SinceKotlin(version = "1.4")
|
|
@NotNull
|
|
public static final char[] toCharArray(@NotNull String str, int i, int i2) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
AbstractList.INSTANCE.checkBoundsIndexes$kotlin_stdlib(i, i2, str.length());
|
|
char[] cArr = new char[i2 - i];
|
|
str.getChars(i, i2, cArr, 0);
|
|
return cArr;
|
|
}
|
|
|
|
public static /* synthetic */ char[] toCharArray$default(String str, int i, int i2, int i3, Object obj) {
|
|
if ((i3 & 1) != 0) {
|
|
i = 0;
|
|
}
|
|
if ((i3 & 2) != 0) {
|
|
i2 = str.length();
|
|
}
|
|
return toCharArray(str, i, i2);
|
|
}
|
|
|
|
@Deprecated(message = "Use lowercase() instead.", replaceWith = @ReplaceWith(expression = "lowercase(Locale.getDefault())", imports = {"java.util.Locale"}))
|
|
@DeprecatedSinceKotlin(errorSince = "2.1", warningSince = "1.5")
|
|
@InlineOnly
|
|
private static final String toLowerCase(String str) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
String lowerCase = str.toLowerCase();
|
|
Intrinsics.checkNotNullExpressionValue(lowerCase, "toLowerCase(...)");
|
|
return lowerCase;
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final Pattern toPattern(String str, int i) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Pattern compile = Pattern.compile(str, i);
|
|
Intrinsics.checkNotNullExpressionValue(compile, "compile(...)");
|
|
return compile;
|
|
}
|
|
|
|
public static /* synthetic */ Pattern toPattern$default(String str, int i, int i2, Object obj) {
|
|
if ((i2 & 1) != 0) {
|
|
i = 0;
|
|
}
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Pattern compile = Pattern.compile(str, i);
|
|
Intrinsics.checkNotNullExpressionValue(compile, "compile(...)");
|
|
return compile;
|
|
}
|
|
|
|
@Deprecated(message = "Use uppercase() instead.", replaceWith = @ReplaceWith(expression = "uppercase(Locale.getDefault())", imports = {"java.util.Locale"}))
|
|
@DeprecatedSinceKotlin(errorSince = "2.1", warningSince = "1.5")
|
|
@InlineOnly
|
|
private static final String toUpperCase(String str) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
String upperCase = str.toUpperCase();
|
|
Intrinsics.checkNotNullExpressionValue(upperCase, "toUpperCase(...)");
|
|
return upperCase;
|
|
}
|
|
|
|
@SinceKotlin(version = "1.5")
|
|
@InlineOnly
|
|
private static final String uppercase(String str) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
String upperCase = str.toUpperCase(Locale.ROOT);
|
|
Intrinsics.checkNotNullExpressionValue(upperCase, "toUpperCase(...)");
|
|
return upperCase;
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final String String(byte[] bytes, Charset charset) {
|
|
Intrinsics.checkNotNullParameter(bytes, "bytes");
|
|
Intrinsics.checkNotNullParameter(charset, "charset");
|
|
return new String(bytes, charset);
|
|
}
|
|
|
|
@SinceKotlin(version = "1.4")
|
|
@NotNull
|
|
@Deprecated(message = "Use replaceFirstChar instead.", replaceWith = @ReplaceWith(expression = "replaceFirstChar { if (it.isLowerCase()) it.titlecase(locale) else it.toString() }", imports = {}))
|
|
@LowPriorityInOverloadResolution
|
|
@DeprecatedSinceKotlin(warningSince = "1.5")
|
|
public static final String capitalize(@NotNull String str, @NotNull Locale locale) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(locale, "locale");
|
|
if (str.length() <= 0) {
|
|
return str;
|
|
}
|
|
char charAt = str.charAt(0);
|
|
if (!Character.isLowerCase(charAt)) {
|
|
return str;
|
|
}
|
|
StringBuilder sb = new StringBuilder();
|
|
char titleCase = Character.toTitleCase(charAt);
|
|
if (titleCase != Character.toUpperCase(charAt)) {
|
|
sb.append(titleCase);
|
|
} else {
|
|
String substring = str.substring(0, 1);
|
|
Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
|
|
Intrinsics.checkNotNull(substring, "null cannot be cast to non-null type java.lang.String");
|
|
String upperCase = substring.toUpperCase(locale);
|
|
Intrinsics.checkNotNullExpressionValue(upperCase, "toUpperCase(...)");
|
|
sb.append(upperCase);
|
|
}
|
|
String substring2 = str.substring(1);
|
|
Intrinsics.checkNotNullExpressionValue(substring2, "substring(...)");
|
|
sb.append(substring2);
|
|
return sb.toString();
|
|
}
|
|
|
|
@SinceKotlin(version = "1.4")
|
|
@NotNull
|
|
public static String concatToString(@NotNull char[] cArr, int i, int i2) {
|
|
Intrinsics.checkNotNullParameter(cArr, "<this>");
|
|
AbstractList.INSTANCE.checkBoundsIndexes$kotlin_stdlib(i, i2, cArr.length);
|
|
return new String(cArr, i, i2 - i);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final boolean contentEquals(String str, StringBuffer stringBuilder) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(stringBuilder, "stringBuilder");
|
|
return str.contentEquals(stringBuilder);
|
|
}
|
|
|
|
@SinceKotlin(version = "1.4")
|
|
@NotNull
|
|
@Deprecated(message = "Use replaceFirstChar instead.", replaceWith = @ReplaceWith(expression = "replaceFirstChar { it.lowercase(locale) }", imports = {}))
|
|
@LowPriorityInOverloadResolution
|
|
@DeprecatedSinceKotlin(warningSince = "1.5")
|
|
public static final String decapitalize(@NotNull String str, @NotNull Locale locale) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(locale, "locale");
|
|
if (str.length() <= 0 || Character.isLowerCase(str.charAt(0))) {
|
|
return str;
|
|
}
|
|
StringBuilder sb = new StringBuilder();
|
|
String substring = str.substring(0, 1);
|
|
Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
|
|
Intrinsics.checkNotNull(substring, "null cannot be cast to non-null type java.lang.String");
|
|
String lowerCase = substring.toLowerCase(locale);
|
|
Intrinsics.checkNotNullExpressionValue(lowerCase, "toLowerCase(...)");
|
|
sb.append(lowerCase);
|
|
String substring2 = str.substring(1);
|
|
Intrinsics.checkNotNullExpressionValue(substring2, "substring(...)");
|
|
sb.append(substring2);
|
|
return sb.toString();
|
|
}
|
|
|
|
@SinceKotlin(version = "1.4")
|
|
@NotNull
|
|
public static final String decodeToString(@NotNull byte[] bArr, int i, int i2, boolean z) {
|
|
Intrinsics.checkNotNullParameter(bArr, "<this>");
|
|
AbstractList.INSTANCE.checkBoundsIndexes$kotlin_stdlib(i, i2, bArr.length);
|
|
if (!z) {
|
|
return new String(bArr, i, i2 - i, Charsets.UTF_8);
|
|
}
|
|
CharsetDecoder newDecoder = Charsets.UTF_8.newDecoder();
|
|
CodingErrorAction codingErrorAction = CodingErrorAction.REPORT;
|
|
String charBuffer = newDecoder.onMalformedInput(codingErrorAction).onUnmappableCharacter(codingErrorAction).decode(ByteBuffer.wrap(bArr, i, i2 - i)).toString();
|
|
Intrinsics.checkNotNullExpressionValue(charBuffer, "toString(...)");
|
|
return charBuffer;
|
|
}
|
|
|
|
@SinceKotlin(version = "1.4")
|
|
@NotNull
|
|
public static final byte[] encodeToByteArray(@NotNull String str, int i, int i2, boolean z) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
AbstractList.INSTANCE.checkBoundsIndexes$kotlin_stdlib(i, i2, str.length());
|
|
if (!z) {
|
|
String substring = str.substring(i, i2);
|
|
Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
|
|
Charset charset = Charsets.UTF_8;
|
|
Intrinsics.checkNotNull(substring, "null cannot be cast to non-null type java.lang.String");
|
|
byte[] bytes = substring.getBytes(charset);
|
|
Intrinsics.checkNotNullExpressionValue(bytes, "getBytes(...)");
|
|
return bytes;
|
|
}
|
|
CharsetEncoder newEncoder = Charsets.UTF_8.newEncoder();
|
|
CodingErrorAction codingErrorAction = CodingErrorAction.REPORT;
|
|
ByteBuffer encode = newEncoder.onMalformedInput(codingErrorAction).onUnmappableCharacter(codingErrorAction).encode(CharBuffer.wrap(str, i, i2));
|
|
if (encode.hasArray() && encode.arrayOffset() == 0) {
|
|
int remaining = encode.remaining();
|
|
byte[] array = encode.array();
|
|
Intrinsics.checkNotNull(array);
|
|
if (remaining == array.length) {
|
|
byte[] array2 = encode.array();
|
|
Intrinsics.checkNotNull(array2);
|
|
return array2;
|
|
}
|
|
}
|
|
byte[] bArr = new byte[encode.remaining()];
|
|
encode.get(bArr);
|
|
return bArr;
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final String format(StringCompanionObject stringCompanionObject, String format, Object... args) {
|
|
Intrinsics.checkNotNullParameter(stringCompanionObject, "<this>");
|
|
Intrinsics.checkNotNullParameter(format, "format");
|
|
Intrinsics.checkNotNullParameter(args, "args");
|
|
String format2 = String.format(format, Arrays.copyOf(args, args.length));
|
|
Intrinsics.checkNotNullExpressionValue(format2, "format(...)");
|
|
return format2;
|
|
}
|
|
|
|
@SinceKotlin(version = "1.5")
|
|
@InlineOnly
|
|
private static final String lowercase(String str, Locale locale) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(locale, "locale");
|
|
String lowerCase = str.toLowerCase(locale);
|
|
Intrinsics.checkNotNullExpressionValue(lowerCase, "toLowerCase(...)");
|
|
return lowerCase;
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final int nativeIndexOf(String str, String str2, int i) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(str2, "str");
|
|
return str.indexOf(str2, i);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final int nativeLastIndexOf(String str, String str2, int i) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(str2, "str");
|
|
return str.lastIndexOf(str2, i);
|
|
}
|
|
|
|
public static /* synthetic */ boolean regionMatches$default(String str, int i, String str2, int i2, int i3, boolean z, int i4, Object obj) {
|
|
if ((i4 & 16) != 0) {
|
|
z = false;
|
|
}
|
|
return regionMatches(str, i, str2, i2, i3, z);
|
|
}
|
|
|
|
public static /* synthetic */ String replace$default(String str, String str2, String str3, boolean z, int i, Object obj) {
|
|
if ((i & 4) != 0) {
|
|
z = false;
|
|
}
|
|
return replace(str, str2, str3, z);
|
|
}
|
|
|
|
public static /* synthetic */ String replaceFirst$default(String str, String str2, String str3, boolean z, int i, Object obj) {
|
|
if ((i & 4) != 0) {
|
|
z = false;
|
|
}
|
|
return replaceFirst(str, str2, str3, z);
|
|
}
|
|
|
|
public static /* synthetic */ boolean startsWith$default(String str, String str2, int i, boolean z, int i2, Object obj) {
|
|
if ((i2 & 4) != 0) {
|
|
z = false;
|
|
}
|
|
return startsWith(str, str2, i, z);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final String substring(String str, int i, int i2) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
String substring = str.substring(i, i2);
|
|
Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
|
|
return substring;
|
|
}
|
|
|
|
public static /* synthetic */ char[] toCharArray$default(String str, char[] destination, int i, int i2, int i3, int i4, Object obj) {
|
|
if ((i4 & 2) != 0) {
|
|
i = 0;
|
|
}
|
|
if ((i4 & 4) != 0) {
|
|
i2 = 0;
|
|
}
|
|
if ((i4 & 8) != 0) {
|
|
i3 = str.length();
|
|
}
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(destination, "destination");
|
|
str.getChars(i2, i3, destination, i);
|
|
return destination;
|
|
}
|
|
|
|
@Deprecated(message = "Use lowercase() instead.", replaceWith = @ReplaceWith(expression = "lowercase(locale)", imports = {}))
|
|
@DeprecatedSinceKotlin(errorSince = "2.1", warningSince = "1.5")
|
|
@InlineOnly
|
|
private static final String toLowerCase(String str, Locale locale) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(locale, "locale");
|
|
String lowerCase = str.toLowerCase(locale);
|
|
Intrinsics.checkNotNullExpressionValue(lowerCase, "toLowerCase(...)");
|
|
return lowerCase;
|
|
}
|
|
|
|
@Deprecated(message = "Use uppercase() instead.", replaceWith = @ReplaceWith(expression = "uppercase(locale)", imports = {}))
|
|
@DeprecatedSinceKotlin(errorSince = "2.1", warningSince = "1.5")
|
|
@InlineOnly
|
|
private static final String toUpperCase(String str, Locale locale) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(locale, "locale");
|
|
String upperCase = str.toUpperCase(locale);
|
|
Intrinsics.checkNotNullExpressionValue(upperCase, "toUpperCase(...)");
|
|
return upperCase;
|
|
}
|
|
|
|
@SinceKotlin(version = "1.5")
|
|
@InlineOnly
|
|
private static final String uppercase(String str, Locale locale) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(locale, "locale");
|
|
String upperCase = str.toUpperCase(locale);
|
|
Intrinsics.checkNotNullExpressionValue(upperCase, "toUpperCase(...)");
|
|
return upperCase;
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final String String(byte[] bytes, int i, int i2) {
|
|
Intrinsics.checkNotNullParameter(bytes, "bytes");
|
|
return new String(bytes, i, i2, Charsets.UTF_8);
|
|
}
|
|
|
|
@SinceKotlin(version = "1.5")
|
|
public static final boolean contentEquals(@Nullable CharSequence charSequence, @Nullable CharSequence charSequence2) {
|
|
if ((charSequence instanceof String) && charSequence2 != null) {
|
|
return ((String) charSequence).contentEquals(charSequence2);
|
|
}
|
|
return StringsKt__StringsKt.contentEqualsImpl(charSequence, charSequence2);
|
|
}
|
|
|
|
@SinceKotlin(version = "1.4")
|
|
@InlineOnly
|
|
private static final String format(String str, Locale locale, Object... args) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(args, "args");
|
|
String format = String.format(locale, str, Arrays.copyOf(args, args.length));
|
|
Intrinsics.checkNotNullExpressionValue(format, "format(...)");
|
|
return format;
|
|
}
|
|
|
|
@NotNull
|
|
public static final String replaceFirst(@NotNull String str, @NotNull String oldValue, @NotNull String newValue, boolean z) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(oldValue, "oldValue");
|
|
Intrinsics.checkNotNullParameter(newValue, "newValue");
|
|
int indexOf$default = StringsKt__StringsKt.indexOf$default(str, oldValue, 0, z, 2, (Object) null);
|
|
return indexOf$default < 0 ? str : StringsKt__StringsKt.replaceRange((CharSequence) str, indexOf$default, oldValue.length() + indexOf$default, (CharSequence) newValue).toString();
|
|
}
|
|
|
|
public static boolean startsWith(@NotNull String str, @NotNull String prefix, int i, boolean z) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(prefix, "prefix");
|
|
if (!z) {
|
|
return str.startsWith(prefix, i);
|
|
}
|
|
return regionMatches(str, i, prefix, 0, prefix.length(), z);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final char[] toCharArray(String str) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
char[] charArray = str.toCharArray();
|
|
Intrinsics.checkNotNullExpressionValue(charArray, "toCharArray(...)");
|
|
return charArray;
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final String String(byte[] bytes) {
|
|
Intrinsics.checkNotNullParameter(bytes, "bytes");
|
|
return new String(bytes, Charsets.UTF_8);
|
|
}
|
|
|
|
@SinceKotlin(version = "1.4")
|
|
@InlineOnly
|
|
private static final String format(StringCompanionObject stringCompanionObject, Locale locale, String format, Object... args) {
|
|
Intrinsics.checkNotNullParameter(stringCompanionObject, "<this>");
|
|
Intrinsics.checkNotNullParameter(format, "format");
|
|
Intrinsics.checkNotNullParameter(args, "args");
|
|
String format2 = String.format(locale, format, Arrays.copyOf(args, args.length));
|
|
Intrinsics.checkNotNullExpressionValue(format2, "format(...)");
|
|
return format2;
|
|
}
|
|
|
|
public static boolean regionMatches(@NotNull String str, int i, @NotNull String other, int i2, int i3, boolean z) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(other, "other");
|
|
if (!z) {
|
|
return str.regionMatches(i, other, i2, i3);
|
|
}
|
|
return str.regionMatches(z, i, other, i2, i3);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final char[] toCharArray(String str, char[] destination, int i, int i2, int i3) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(destination, "destination");
|
|
str.getChars(i2, i3, destination, i);
|
|
return destination;
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final String String(char[] chars) {
|
|
Intrinsics.checkNotNullParameter(chars, "chars");
|
|
return new String(chars);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final String String(char[] chars, int i, int i2) {
|
|
Intrinsics.checkNotNullParameter(chars, "chars");
|
|
return new String(chars, i, i2);
|
|
}
|
|
|
|
@SinceKotlin(version = "1.5")
|
|
public static final boolean contentEquals(@Nullable CharSequence charSequence, @Nullable CharSequence charSequence2, boolean z) {
|
|
if (z) {
|
|
return StringsKt__StringsKt.contentEqualsIgnoreCaseImpl(charSequence, charSequence2);
|
|
}
|
|
return contentEquals(charSequence, charSequence2);
|
|
}
|
|
|
|
@NotNull
|
|
public static final String replace(@NotNull String str, @NotNull String oldValue, @NotNull String newValue, boolean z) {
|
|
Intrinsics.checkNotNullParameter(str, "<this>");
|
|
Intrinsics.checkNotNullParameter(oldValue, "oldValue");
|
|
Intrinsics.checkNotNullParameter(newValue, "newValue");
|
|
int i = 0;
|
|
int indexOf = StringsKt__StringsKt.indexOf(str, oldValue, 0, z);
|
|
if (indexOf < 0) {
|
|
return str;
|
|
}
|
|
int length = oldValue.length();
|
|
int coerceAtLeast = RangesKt.coerceAtLeast(length, 1);
|
|
int length2 = newValue.length() + (str.length() - length);
|
|
if (length2 >= 0) {
|
|
StringBuilder sb = new StringBuilder(length2);
|
|
do {
|
|
sb.append((CharSequence) str, i, indexOf);
|
|
sb.append(newValue);
|
|
i = indexOf + length;
|
|
if (indexOf >= str.length()) {
|
|
break;
|
|
}
|
|
indexOf = StringsKt__StringsKt.indexOf(str, oldValue, indexOf + coerceAtLeast, z);
|
|
} while (indexOf > 0);
|
|
sb.append((CharSequence) str, i, str.length());
|
|
String sb2 = sb.toString();
|
|
Intrinsics.checkNotNullExpressionValue(sb2, "toString(...)");
|
|
return sb2;
|
|
}
|
|
throw new OutOfMemoryError();
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final String String(int[] codePoints, int i, int i2) {
|
|
Intrinsics.checkNotNullParameter(codePoints, "codePoints");
|
|
return new String(codePoints, i, i2);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final String String(StringBuffer stringBuffer) {
|
|
Intrinsics.checkNotNullParameter(stringBuffer, "stringBuffer");
|
|
return new String(stringBuffer);
|
|
}
|
|
|
|
@InlineOnly
|
|
private static final String String(StringBuilder stringBuilder) {
|
|
Intrinsics.checkNotNullParameter(stringBuilder, "stringBuilder");
|
|
return new String(stringBuilder);
|
|
}
|
|
}
|