mirror of
https://github.com/Aviortheking/Neo-Store.git
synced 2025-06-16 04:19:19 +00:00
Fix: Manage most missing names of authors
This commit is contained in:
@ -30,6 +30,17 @@ fun String?.trimAfter(char: Char, repeated: Int): String? {
|
||||
return null
|
||||
}
|
||||
|
||||
fun String?.trimBefore(char: Char, repeated: Int): String? {
|
||||
var count = 0
|
||||
this?.let {
|
||||
for (i in it.indices) {
|
||||
if (it[i] == char) count++
|
||||
if (repeated == count) return it.substring(i+1)
|
||||
}
|
||||
}
|
||||
return null
|
||||
}
|
||||
|
||||
fun Char.halfByte(): Int {
|
||||
return when (this) {
|
||||
in '0'..'9' -> this - '0'
|
||||
|
Reference in New Issue
Block a user