mirror of
https://github.com/ReVanced/revanced-patches.git
synced 2024-11-10 01:01:56 +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
1 changed files with 4 additions and 4 deletions
|
@ -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 a new issue