SyntaxFix
Write A Post
Hire A Developer
Questions
In Kotlin
private fun removeLastChar(str: String?): String? { return if (str == null || str.isEmpty()) str else str.substring(0, str.length - 1) }