DEV Community

Cover image for BigBrainKotlin#2 | Mumbling...
Chetan garg
Chetan garg

Posted on • Originally published at chetangupta.net

BigBrainKotlin#2 | Mumbling...

Don't be a Java-ish dev in Kotlin-ish world, improve your knowledge about Koltin Standard Library and write better Kotlin code. ✌🏻 If your Java dev migrating to Kotlin this will help you learn alot!

BBK

The aim of these articles is not hate on Java, but to help people learn various ways in which they can write the same logic better and more Kotlin standard library focused way.

Question:
This time no story, no theory. The examples below show you how to do :

mummble("abcd") -> "A-Bb-Ccc-Dddd"
mummble("RqaEzty") -> "R-Qq-Aaa-Eeee-Zzzzz-Tttttt-Yyyyyyy"
mummble("cwAt") -> "C-Ww-Aaa-Tttt"
Enter fullscreen mode Exit fullscreen mode

Try it out yourself, or submit it in the comments before checking out my solutions.

👉 BigBrainKotlin#2

Hope to see you on the other side...

Until next time. Happy Hacking! 👩‍💻

Stalk Me 👀 :
LinkedIn | Medium | Twitter | StackOverflow | CodeWars |WorkX |Github |Instagram |Youtube

AWS Security LIVE!

Join us for AWS Security LIVE!

Discover the future of cloud security. Tune in live for trends, tips, and solutions from AWS and AWS Partners.

Learn More

Top comments (0)

Sentry mobile image

Improving mobile performance, from slow screens to app start time

Based on our experience working with thousands of mobile developer teams, we developed a mobile monitoring maturity curve.

Read more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay