``` fun String.partitionAfterLast(c: Char): Pair&l...
# getting-started
b
Copy code
fun String.partitionAfterLast(c: Char): Pair<String, String> {
    val lastIndex = this.lastIndexOf(c)
    return Pair(this.substring(0, lastIndex), this.substring(lastIndex + 1, this.length))
}

"1:2:3".partitionAfterLast(':')
making everything on your own would be also an option (without the need of reversing)