apkfuckery/com.discord/smali_classes2/w/a0/l.smali

299 lines
5.7 KiB
Smali
Raw Normal View History

2020-02-20 19:33:18 +00:00
.class public Lw/a0/l;
2020-03-10 23:21:53 +00:00
.super Ljava/lang/Object;
.source "Indent.kt"
2019-12-06 03:29:40 +00:00
# direct methods
.method public constructor <init>()V
.locals 0
2020-03-10 23:21:53 +00:00
invoke-direct {p0}, Ljava/lang/Object;-><init>()V
2019-12-06 03:29:40 +00:00
return-void
.end method
2020-03-10 23:21:53 +00:00
.method public static final trimMargin(Ljava/lang/String;Ljava/lang/String;)Ljava/lang/String;
.locals 14
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
const/4 v0, 0x0
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
if-eqz p0, :cond_e
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
if-eqz p1, :cond_d
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
const-string v1, ""
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
invoke-static {p1}, Lw/a0/p;->isBlank(Ljava/lang/CharSequence;)Z
move-result v2
const/4 v3, 0x1
xor-int/2addr v2, v3
if-eqz v2, :cond_c
const-string v2, "\r\n"
const-string v4, "\n"
const-string v5, "\r"
filled-new-array {v2, v4, v5}, [Ljava/lang/String;
move-result-object v2
const/4 v4, 0x6
const/4 v5, 0x0
invoke-static {p0, v2, v5, v5, v4}, Lw/a0/u;->splitToSequence$default(Ljava/lang/CharSequence;[Ljava/lang/String;ZII)Lkotlin/sequences/Sequence;
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
move-result-object v2
invoke-static {v2}, Le/k/a/c/e/p/g;->toList(Lkotlin/sequences/Sequence;)Ljava/util/List;
move-result-object v2
invoke-virtual {p0}, Ljava/lang/String;->length()I
move-result p0
invoke-interface {v2}, Ljava/util/List;->size()I
move-result v4
mul-int/lit8 v4, v4, 0x0
add-int/2addr v4, p0
invoke-interface {v1}, Ljava/lang/CharSequence;->length()I
move-result p0
if-nez p0, :cond_0
const/4 p0, 0x1
2019-12-06 03:29:40 +00:00
goto :goto_0
2020-03-10 23:21:53 +00:00
:cond_0
const/4 p0, 0x0
2019-12-06 03:29:40 +00:00
:goto_0
2020-03-10 23:21:53 +00:00
if-eqz p0, :cond_1
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
sget-object p0, Lw/a0/j;->d:Lw/a0/j;
2019-12-06 03:29:40 +00:00
goto :goto_1
2020-03-10 23:21:53 +00:00
:cond_1
new-instance p0, Lw/a0/k;
invoke-direct {p0, v1}, Lw/a0/k;-><init>(Ljava/lang/String;)V
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
:goto_1
invoke-static {v2}, Le/k/a/c/e/p/g;->getLastIndex(Ljava/util/List;)I
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
move-result v1
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
new-instance v6, Ljava/util/ArrayList;
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
invoke-direct {v6}, Ljava/util/ArrayList;-><init>()V
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
invoke-interface {v2}, Ljava/lang/Iterable;->iterator()Ljava/util/Iterator;
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
move-result-object v2
const/4 v7, 0x0
:goto_2
invoke-interface {v2}, Ljava/util/Iterator;->hasNext()Z
move-result v8
if-eqz v8, :cond_b
invoke-interface {v2}, Ljava/util/Iterator;->next()Ljava/lang/Object;
move-result-object v8
add-int/lit8 v9, v7, 0x1
if-ltz v7, :cond_a
check-cast v8, Ljava/lang/String;
if-eqz v7, :cond_2
if-ne v7, v1, :cond_3
:cond_2
invoke-static {v8}, Lw/a0/p;->isBlank(Ljava/lang/CharSequence;)Z
move-result v7
if-eqz v7, :cond_3
move-object v7, v0
goto :goto_7
2019-12-06 03:29:40 +00:00
:cond_3
2020-03-10 23:21:53 +00:00
invoke-interface {v8}, Ljava/lang/CharSequence;->length()I
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
move-result v7
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
const/4 v10, 0x0
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
:goto_3
const/4 v11, -0x1
if-ge v10, v7, :cond_5
invoke-interface {v8, v10}, Ljava/lang/CharSequence;->charAt(I)C
move-result v12
invoke-static {v12}, Le/k/a/c/e/p/g;->isWhitespace(C)Z
move-result v12
xor-int/2addr v12, v3
if-eqz v12, :cond_4
goto :goto_4
2019-12-06 03:29:40 +00:00
2020-01-07 02:40:43 +00:00
:cond_4
2020-03-10 23:21:53 +00:00
add-int/lit8 v10, v10, 0x1
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
goto :goto_3
2019-12-06 03:29:40 +00:00
2020-03-10 23:21:53 +00:00
:cond_5
const/4 v10, -0x1
:goto_4
if-ne v10, v11, :cond_6
goto :goto_5
:cond_6
const/4 v7, 0x4
invoke-static {v8, p1, v10, v5, v7}, Lw/a0/p;->startsWith$default(Ljava/lang/String;Ljava/lang/String;IZI)Z
move-result v7
if-eqz v7, :cond_7
invoke-virtual {p1}, Ljava/lang/String;->length()I
move-result v7
add-int/2addr v7, v10
invoke-virtual {v8, v7}, Ljava/lang/String;->substring(I)Ljava/lang/String;
move-result-object v7
const-string v10, "(this as java.lang.String).substring(startIndex)"
invoke-static {v7, v10}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
goto :goto_6
:cond_7
:goto_5
move-object v7, v0
:goto_6
if-eqz v7, :cond_8
invoke-interface {p0, v7}, Lkotlin/jvm/functions/Function1;->invoke(Ljava/lang/Object;)Ljava/lang/Object;
move-result-object v7
check-cast v7, Ljava/lang/String;
if-eqz v7, :cond_8
goto :goto_7
:cond_8
move-object v7, v8
:goto_7
if-eqz v7, :cond_9
invoke-interface {v6, v7}, Ljava/util/Collection;->add(Ljava/lang/Object;)Z
:cond_9
move v7, v9
goto :goto_2
:cond_a
invoke-static {}, Le/k/a/c/e/p/g;->throwIndexOverflow()V
throw v0
:cond_b
new-instance p0, Ljava/lang/StringBuilder;
invoke-direct {p0, v4}, Ljava/lang/StringBuilder;-><init>(I)V
const/4 v11, -0x1
const/4 v13, 0x0
const-string v8, "\n"
const-string v10, ""
const-string v12, "..."
move-object v7, p0
move-object v9, v10
invoke-static/range {v6 .. v13}, Lw/q/l;->joinTo(Ljava/lang/Iterable;Ljava/lang/Appendable;Ljava/lang/CharSequence;Ljava/lang/CharSequence;Ljava/lang/CharSequence;ILjava/lang/CharSequence;Lkotlin/jvm/functions/Function1;)Ljava/lang/Appendable;
invoke-virtual {p0}, Ljava/lang/StringBuilder;->toString()Ljava/lang/String;
move-result-object p0
const-string p1, "mapIndexedNotNull { inde\u2026\"\\n\")\n .toString()"
invoke-static {p0, p1}, Lw/u/b/j;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
return-object p0
:cond_c
new-instance p0, Ljava/lang/IllegalArgumentException;
const-string p1, "marginPrefix must be non-blank string."
invoke-virtual {p1}, Ljava/lang/Object;->toString()Ljava/lang/String;
move-result-object p1
invoke-direct {p0, p1}, Ljava/lang/IllegalArgumentException;-><init>(Ljava/lang/String;)V
2019-12-06 03:29:40 +00:00
2020-01-07 02:40:43 +00:00
throw p0
2020-03-10 23:21:53 +00:00
:cond_d
const-string p0, "marginPrefix"
invoke-static {p0}, Lw/u/b/j;->a(Ljava/lang/String;)V
throw v0
:cond_e
const-string p0, "$this$trimMargin"
invoke-static {p0}, Lw/u/b/j;->a(Ljava/lang/String;)V
throw v0
2019-12-06 03:29:40 +00:00
.end method