Good day, I'm starter and I have some problem:
I want to convert this "ромка" or this "роМка" to "Ромка" using this code. My code is OK. I have problem with toString().
Rewrite string using only one first upper char. Problem with converting
charArraytoString
var name = "ромка"
var charName = name.toLowerCase().toCharArray()
charName[0] = charName[0].toUpperCase()
name = charName.toString()
Results:
charName: {'Р', 'о', 'м', 'к', 'а'}
name == "[C@93ec54"
Screenshot
var name = "ромка"
val result = name.toLowerCase().capitalize()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With