Last active
September 18, 2019 07:02
-
-
Save MithraTalluri/24298c475561fb7ee316a6beb2af1c5c to your computer and use it in GitHub Desktop.
This file contains hidden or 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
fun String.lastChar() = get(length - 1) //returns the last char in a string | |
val lastChar: Char = "abcd".lastChar() // d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment