59 lines
1.5 KiB
Smali
59 lines
1.5 KiB
Smali
.class public final Lcom/discord/utilities/StringUtilsKt;
|
|
.super Ljava/lang/Object;
|
|
.source "StringUtils.kt"
|
|
|
|
|
|
# static fields
|
|
.field public static final STRIP_ACCENTS_REGEX:Lkotlin/text/Regex;
|
|
|
|
|
|
# direct methods
|
|
.method public static constructor <clinit>()V
|
|
.locals 2
|
|
|
|
new-instance v0, Lkotlin/text/Regex;
|
|
|
|
const-string v1, "[\\p{InCombiningDiacriticalMarks}]"
|
|
|
|
invoke-direct {v0, v1}, Lkotlin/text/Regex;-><init>(Ljava/lang/String;)V
|
|
|
|
sput-object v0, Lcom/discord/utilities/StringUtilsKt;->STRIP_ACCENTS_REGEX:Lkotlin/text/Regex;
|
|
|
|
return-void
|
|
.end method
|
|
|
|
.method public static final stripAccents(Ljava/lang/String;)Ljava/lang/String;
|
|
.locals 2
|
|
|
|
if-eqz p0, :cond_0
|
|
|
|
sget-object v0, Ljava/text/Normalizer$Form;->NFKD:Ljava/text/Normalizer$Form;
|
|
|
|
invoke-static {p0, v0}, Ljava/text/Normalizer;->normalize(Ljava/lang/CharSequence;Ljava/text/Normalizer$Form;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
const-string v0, "normalizedString"
|
|
|
|
invoke-static {p0, v0}, Li0/n/c/h;->checkExpressionValueIsNotNull(Ljava/lang/Object;Ljava/lang/String;)V
|
|
|
|
sget-object v0, Lcom/discord/utilities/StringUtilsKt;->STRIP_ACCENTS_REGEX:Lkotlin/text/Regex;
|
|
|
|
const-string v1, ""
|
|
|
|
invoke-virtual {v0, p0, v1}, Lkotlin/text/Regex;->replace(Ljava/lang/CharSequence;Ljava/lang/String;)Ljava/lang/String;
|
|
|
|
move-result-object p0
|
|
|
|
return-object p0
|
|
|
|
:cond_0
|
|
const-string p0, "$this$stripAccents"
|
|
|
|
invoke-static {p0}, Li0/n/c/h;->c(Ljava/lang/String;)V
|
|
|
|
const/4 p0, 0x0
|
|
|
|
throw p0
|
|
.end method
|