mirror of
https://github.com/Pinball3D/Rabbit-R1.git
synced 2024-12-28 01:52:26 -06:00
31 lines
1.5 KiB
Java
31 lines
1.5 KiB
Java
package kotlin.text;
|
|
|
|
import java.util.Locale;
|
|
import kotlin.Metadata;
|
|
import kotlin.jvm.internal.Intrinsics;
|
|
|
|
/* compiled from: _OneToManyTitlecaseMappings.kt */
|
|
@Metadata(d1 = {"\u0000\f\n\u0000\n\u0002\u0010\u000e\n\u0002\u0010\f\n\u0000\u001a\f\u0010\u0000\u001a\u00020\u0001*\u00020\u0002H\u0000¨\u0006\u0003"}, d2 = {"titlecaseImpl", "", "", "kotlin-stdlib"}, k = 2, mv = {1, 9, 0}, xi = 48)
|
|
/* loaded from: classes3.dex */
|
|
public final class _OneToManyTitlecaseMappingsKt {
|
|
public static final String titlecaseImpl(char c) {
|
|
String valueOf = String.valueOf(c);
|
|
Intrinsics.checkNotNull(valueOf, "null cannot be cast to non-null type java.lang.String");
|
|
String upperCase = valueOf.toUpperCase(Locale.ROOT);
|
|
Intrinsics.checkNotNullExpressionValue(upperCase, "toUpperCase(...)");
|
|
if (upperCase.length() <= 1) {
|
|
return String.valueOf(Character.toTitleCase(c));
|
|
}
|
|
if (c == 329) {
|
|
return upperCase;
|
|
}
|
|
char charAt = upperCase.charAt(0);
|
|
Intrinsics.checkNotNull(upperCase, "null cannot be cast to non-null type java.lang.String");
|
|
String substring = upperCase.substring(1);
|
|
Intrinsics.checkNotNullExpressionValue(substring, "substring(...)");
|
|
Intrinsics.checkNotNull(substring, "null cannot be cast to non-null type java.lang.String");
|
|
String lowerCase = substring.toLowerCase(Locale.ROOT);
|
|
Intrinsics.checkNotNullExpressionValue(lowerCase, "toLowerCase(...)");
|
|
return charAt + lowerCase;
|
|
}
|
|
}
|