With Retrofit, I get the url data in string data type, but I need the file name inside the url, how can I get it?
I have visited many websites but I couldn't find any results about it.
CodePudding user response:
Try this in Kotlin
url.substringAfterLast("/").substringBeforeLast(".")