Skip to content

Instantly share code, notes, and snippets.

View mert-aydin's full-sized avatar

Mert Aydın mert-aydin

  • İstanbul, Turkey
View GitHub Profile
@mert-aydin
mert-aydin / ReplaceTurkishChars.kt
Last active September 13, 2021 16:01
Replace Turkish characters to their English representations
fun String.toEnglishChars(): String {
var res = this
mapOf("Ç" to "C", "ç" to "c", "Ğ" to "G", "ğ" to "g", "İ" to "I", "ı" to "i", "Ö" to "O", "ö" to "o", "Ş" to "S", "ş" to "s", "Ü" to "U", "ü" to "u").entries.forEach { res = res.replace(it.key, it.value) }
return res
}