Here’s my solution. Any feedback would be welcomed!
fun main() {
println("Kotlin Programming".toDragonSpeakExt())
}
private fun String.toDragonSpeakExt() =
this.replace(Regex("[aeiouAEIOU]")) {
when (it.value.toLowerCase()) {
"a" -> "4"
"e" -> "3"
"i" -> "1"
"o" -> "0"
"u" -> "|_|"
else -> it.value
}
}