commonMain.ru.casperix.atlas.PathUtil.kt Maven / Gradle / Ivy
The newest version!
package ru.casperix.atlas
/**
* Temp class, before fix "kotlin.io.path.Path" miss-error
*/
object PathUtil {
val separator = '/'
fun pathParent(value: String): String? {
val sep = value.replace('\\', separator)
val index = sep.lastIndexOf(separator)
if (index == -1) return null
return sep.slice(0 until index)
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy