what is Kotlin equivalent of this Java's code: `str.charAt(str.length() -1) == ' '`
m
what is Kotlin equivalent of this Java's code:
str.charAt(str.length() -1) == ' '
t
I’d go for
str.last() == ' '
šŸ‘ 2
r
Or
str.endsWith(' ')
āž• 7