apkfuckery/com.discord/smali/kotlin/text/w.smali

500 lines
12 KiB
Smali
Raw Normal View History

2019-07-24 11:27:29 +00:00
.class public Lkotlin/text/w;
.super Lkotlin/text/v;
.source "_Strings.kt"
# direct methods
.method public constructor <init>()V
.locals 0
invoke-direct {p0}, Lkotlin/text/v;-><init>()V
return-void
.end method
2019-10-09 23:16:36 +00:00
.method public static final chunked(Ljava/lang/CharSequence;I)Ljava/util/List;
.locals 1
2019-07-24 11:27:29 +00:00
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/CharSequence;",
2019-10-09 23:16:36 +00:00
"I)",
2019-07-24 11:27:29 +00:00
"Ljava/util/List<",
"Ljava/lang/String;",
">;"
}
.end annotation
2019-10-09 23:16:36 +00:00
const-string v0, "$this$chunked"
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const/4 v0, 0x1
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-static {p0, p1, p1, v0}, Lkotlin/text/l;->windowed(Ljava/lang/CharSequence;IIZ)Ljava/util/List;
2019-07-24 11:27:29 +00:00
move-result-object p0
return-object p0
.end method
2019-10-09 23:16:36 +00:00
.method public static final drop(Ljava/lang/CharSequence;I)Ljava/lang/CharSequence;
.locals 1
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const-string v0, "$this$drop"
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
if-ltz p1, :cond_0
const/4 v0, 0x1
goto :goto_0
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
:cond_0
const/4 v0, 0x0
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
:goto_0
if-eqz v0, :cond_1
2019-07-24 11:27:29 +00:00
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
2019-10-09 23:16:36 +00:00
move-result v0
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-static {p1, v0}, Lkotlin/ranges/c;->coerceAtMost(II)I
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move-result p1
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move-result v0
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-interface {p0, p1, v0}, Ljava/lang/CharSequence;->subSequence(II)Ljava/lang/CharSequence;
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move-result-object p0
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
return-object p0
:cond_1
new-instance p0, Ljava/lang/StringBuilder;
const-string v0, "Requested character count "
invoke-direct {p0, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string p1, " is less than zero."
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
new-instance p1, Ljava/lang/IllegalArgumentException;
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.end method
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
.method public static final drop(Ljava/lang/String;I)Ljava/lang/String;
.locals 1
const-string v0, "$this$drop"
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
if-ltz p1, :cond_0
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const/4 v0, 0x1
goto :goto_0
2019-07-24 11:27:29 +00:00
:cond_0
2019-10-09 23:16:36 +00:00
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_1
invoke-virtual {p0}, Ljava/lang/String;->length()I
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move-result v0
invoke-static {p1, v0}, Lkotlin/ranges/c;->coerceAtMost(II)I
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move-result p1
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-virtual {p0, p1}, Ljava/lang/String;->substring(I)Ljava/lang/String;
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move-result-object p0
const-string p1, "(this as java.lang.String).substring(startIndex)"
invoke-static {p0, p1}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
:cond_1
new-instance p0, Ljava/lang/StringBuilder;
const-string v0, "Requested character count "
invoke-direct {p0, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string p1, " is less than zero."
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
new-instance p1, Ljava/lang/IllegalArgumentException;
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.end method
.method public static final first(Ljava/lang/CharSequence;)C
.locals 2
const-string v0, "$this$first"
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
move-result v0
const/4 v1, 0x0
if-nez v0, :cond_0
const/4 v0, 0x1
2019-07-24 11:27:29 +00:00
goto :goto_0
2019-10-09 23:16:36 +00:00
:cond_0
const/4 v0, 0x0
:goto_0
if-nez v0, :cond_1
invoke-interface {p0, v1}, Ljava/lang/CharSequence;->charAt(I)C
move-result p0
return p0
2019-07-24 11:27:29 +00:00
:cond_1
2019-10-09 23:16:36 +00:00
new-instance p0, Ljava/util/NoSuchElementException;
const-string v0, "Char sequence is empty."
invoke-direct {p0, v0}, Ljava/util/NoSuchElementException;-><init>(Ljava/lang/String;)V
check-cast p0, Ljava/lang/Throwable;
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
throw p0
2019-07-24 11:27:29 +00:00
.end method
2019-10-09 23:16:36 +00:00
.method public static final firstOrNull(Ljava/lang/CharSequence;)Ljava/lang/Character;
.locals 2
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const-string v0, "$this$firstOrNull"
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
move-result v0
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const/4 v1, 0x0
if-nez v0, :cond_0
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
if-eqz v0, :cond_1
const/4 p0, 0x0
return-object p0
:cond_1
invoke-interface {p0, v1}, Ljava/lang/CharSequence;->charAt(I)C
move-result p0
invoke-static {p0}, Ljava/lang/Character;->valueOf(C)Ljava/lang/Character;
2019-07-24 11:27:29 +00:00
move-result-object p0
return-object p0
.end method
2019-10-09 23:16:36 +00:00
.method public static final take(Ljava/lang/String;I)Ljava/lang/String;
2019-08-17 08:22:04 +00:00
.locals 2
const-string v0, "$this$take"
2019-10-09 23:16:36 +00:00
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-08-17 08:22:04 +00:00
const/4 v0, 0x0
if-ltz p1, :cond_0
const/4 v1, 0x1
goto :goto_0
:cond_0
const/4 v1, 0x0
:goto_0
if-eqz v1, :cond_1
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result v1
2019-10-09 23:16:36 +00:00
invoke-static {p1, v1}, Lkotlin/ranges/c;->coerceAtMost(II)I
2019-08-17 08:22:04 +00:00
move-result p1
invoke-virtual {p0, v0, p1}, Ljava/lang/String;->substring(II)Ljava/lang/String;
move-result-object p0
const-string p1, "(this as java.lang.Strin\u2026ing(startIndex, endIndex)"
2019-10-09 23:16:36 +00:00
invoke-static {p0, p1}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-08-17 08:22:04 +00:00
return-object p0
:cond_1
new-instance p0, Ljava/lang/StringBuilder;
const-string v0, "Requested character count "
invoke-direct {p0, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
const-string p1, " is less than zero."
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
new-instance p1, Ljava/lang/IllegalArgumentException;
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.end method
2019-10-09 23:16:36 +00:00
.method public static final takeLast(Ljava/lang/String;I)Ljava/lang/String;
.locals 1
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const-string v0, "$this$takeLast"
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
if-ltz p1, :cond_0
2019-07-24 11:27:29 +00:00
const/4 v0, 0x1
goto :goto_0
:cond_0
const/4 v0, 0x0
:goto_0
2019-10-09 23:16:36 +00:00
if-eqz v0, :cond_1
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-virtual {p0}, Ljava/lang/String;->length()I
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
move-result v0
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-static {p1, v0}, Lkotlin/ranges/c;->coerceAtMost(II)I
move-result p1
sub-int/2addr v0, p1
invoke-virtual {p0, v0}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object p0
const-string p1, "(this as java.lang.String).substring(startIndex)"
invoke-static {p0, p1}, Lkotlin/jvm/internal/l;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
2019-07-24 11:27:29 +00:00
:cond_1
2019-10-09 23:16:36 +00:00
new-instance p0, Ljava/lang/StringBuilder;
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const-string v0, "Requested character count "
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-direct {p0, v0}, Ljava/lang/StringBuilder;-><init>(Ljava/lang/String;)V
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(I)Ljava/lang/StringBuilder;
2019-07-24 11:27:29 +00:00
2019-10-09 23:16:36 +00:00
const-string p1, " is less than zero."
invoke-virtual {p0, p1}, Ljava/lang/StringBuilder;->append(Ljava/lang/String;)Ljava/lang/StringBuilder;
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
new-instance p1, Ljava/lang/IllegalArgumentException;
invoke-virtual {p0}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p0
invoke-direct {p1, p0}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
check-cast p1, Ljava/lang/Throwable;
throw p1
.end method
.method public static final windowed(Ljava/lang/CharSequence;IIZ)Ljava/util/List;
.locals 1
.annotation system Ldalvik/annotation/Signature;
value = {
"(",
"Ljava/lang/CharSequence;",
"IIZ)",
"Ljava/util/List<",
"Ljava/lang/String;",
">;"
}
.end annotation
const-string v0, "$this$windowed"
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
2019-10-28 23:46:47 +00:00
sget-object v0, Lkotlin/text/w$a;->bji:Lkotlin/text/w$a;
2019-10-09 23:16:36 +00:00
check-cast v0, Lkotlin/jvm/functions/Function1;
invoke-static {p0, p1, p2, p3, v0}, Lkotlin/text/l;->windowed(Ljava/lang/CharSequence;IIZLkotlin/jvm/functions/Function1;)Ljava/util/List;
move-result-object p0
return-object p0
.end method
.method public static final windowed(Ljava/lang/CharSequence;IIZLkotlin/jvm/functions/Function1;)Ljava/util/List;
.locals 4
.annotation system Ldalvik/annotation/Signature;
value = {
"<R:",
"Ljava/lang/Object;",
">(",
"Ljava/lang/CharSequence;",
"IIZ",
"Lkotlin/jvm/functions/Function1<",
"-",
"Ljava/lang/CharSequence;",
"+TR;>;)",
"Ljava/util/List<",
"TR;>;"
}
.end annotation
const-string v0, "$this$windowed"
invoke-static {p0, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
const-string v0, "transform"
invoke-static {p4, v0}, Lkotlin/jvm/internal/l;->checkParameterIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
invoke-static {p1, p2}, Lkotlin/a/ao;->checkWindowSizeStep(II)V
invoke-interface {p0}, Ljava/lang/CharSequence;->length()I
move-result v0
new-instance v1, Ljava/util/ArrayList;
add-int v2, v0, p2
add-int/lit8 v2, v2, -0x1
div-int/2addr v2, p2
invoke-direct {v1, v2}, Ljava/util/ArrayList;-><init>(I)V
const/4 v2, 0x0
:goto_0
if-ge v2, v0, :cond_1
add-int v3, v2, p1
if-le v3, v0, :cond_0
if-eqz p3, :cond_1
move v3, v0
:cond_0
invoke-interface {p0, v2, v3}, Ljava/lang/CharSequence;->subSequence(II)Ljava/lang/CharSequence;
move-result-object v3
invoke-interface {p4, v3}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v3
invoke-virtual {v1, v3}, Ljava/util/ArrayList;->add(Ljava/lang/Object;)Z
add-int/2addr v2, p2
goto :goto_0
:cond_1
check-cast v1, Ljava/util/List;
return-object v1
2019-07-24 11:27:29 +00:00
.end method