mirror of https://github.com/Corewala/Buran
Removed unused transverse function
This commit is contained in:
parent
eee109bb28
commit
eac1adb0cb
|
@ -64,34 +64,6 @@ class OppenURI constructor(private var ouri: String) {
|
||||||
return ouri
|
return ouri
|
||||||
}
|
}
|
||||||
|
|
||||||
fun traverse(): OppenURI{
|
|
||||||
val path = ouri.removePrefix("$GEMSCHEME$host")
|
|
||||||
val segments = path.split(SOLIDUS).filter { it.isNotEmpty() }
|
|
||||||
|
|
||||||
var nouri = "$GEMSCHEME$host"
|
|
||||||
|
|
||||||
when (ouri) {
|
|
||||||
"" -> {
|
|
||||||
}
|
|
||||||
GEMSCHEME -> ouri = ""
|
|
||||||
"$nouri/" -> ouri = GEMSCHEME
|
|
||||||
else -> {
|
|
||||||
when {
|
|
||||||
segments.isNotEmpty() -> {
|
|
||||||
val remaining = segments.dropLast(1)
|
|
||||||
remaining.forEach { segment ->
|
|
||||||
nouri += "/$segment"
|
|
||||||
}
|
|
||||||
ouri = "$nouri/"
|
|
||||||
}
|
|
||||||
else -> ouri = "$nouri/"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return this
|
|
||||||
}
|
|
||||||
|
|
||||||
private fun traverse(count: Int): String{
|
private fun traverse(count: Int): String{
|
||||||
val path = ouri.removePrefix("$GEMSCHEME$host")
|
val path = ouri.removePrefix("$GEMSCHEME$host")
|
||||||
val segments = path.split(SOLIDUS).filter { it.isNotEmpty() }
|
val segments = path.split(SOLIDUS).filter { it.isNotEmpty() }
|
||||||
|
|
Loading…
Reference in New Issue