nameWithoutExtension

Returns the name of this file or directory without an extension, or an empty string if this path has zero path elements.

Since Kotlin

1.5