Kotlin get File Name example

This Kotlin tutorial shows you ways to get File Name from full path with Kotlin Regex and extension functions.


>>> Refer to: JavaSampleApproach.com

I. Technology

– Java 1.8
– Kotlin 1.1.2

II. Practice

1. Using Regex

Result:

2. Using Kotlin String extension function

Result:

Add Comment