Last active
August 21, 2021 12:37
-
-
Save magdamiu/86517f0dd0a9b2fa8c20349666fbcf56 to your computer and use it in GitHub Desktop.
Clean Code with Kotlin by Magda Miu - Meaningful names 1 - Clean Code
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
data class PathParts(val directory: String, val fileName: String) | |
fun splitPath(path: String) = | |
PathParts( | |
path.substringBeforeLast('/', ""), | |
path.substringAfterLast('/')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment