mirror of
https://github.com/revanced/revanced-patches
synced 2024-12-24 04:35:49 +01:00
refactor: more readable code
- Changes singular `prefix` vararg to `prefixes`. - Changes `_prefix` in loop to `prefix`
This commit is contained in:
parent
ee50ac01a4
commit
6419816b47
@ -19,9 +19,9 @@ internal fun Node.doRecursively(action: (Node) -> Unit) {
|
||||
for (i in 0 until this.childNodes.length) this.childNodes.item(i).doRecursively(action)
|
||||
}
|
||||
|
||||
internal fun String.startsWithAny(vararg prefix: String): Boolean {
|
||||
for (_prefix in prefix)
|
||||
if (this.startsWith(_prefix))
|
||||
internal fun String.startsWithAny(vararg prefixes: String): Boolean {
|
||||
for (prefix in prefixes)
|
||||
if (this.startsWith(prefix))
|
||||
return true
|
||||
|
||||
return false
|
||||
@ -33,4 +33,4 @@ internal fun String.containsAny(vararg others: String): Boolean {
|
||||
return true
|
||||
|
||||
return false
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user