stripExtension

fun stripExtension(filename: String): String

Removes the extension (anything after the first '.'), otherwise returns the original filename.