Last active
August 14, 2020 23:13
-
-
Save ibrahimyilmaz/0ef663f1c226b0e7d5865cd1f3c47a5d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Account(val iban: String) { | |
fun getFormattedIban():String { | |
val sb = StringBuilder() | |
for (i in 0..15) { | |
if (i % 4 == 0) sb.append(" ") | |
sb.append(iban[i]) | |
} | |
return sb.toString() | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment