There was an error while loading. Please reload this page.
1 parent 81f1eaa commit 4072e90Copy full SHA for 4072e90
1 file changed
src/main/kotlin/mate/academy/MakeAbbreviation.kt
@@ -1,6 +1,9 @@
1
package mate.academy
2
3
fun makeAbbr(source: String) : String {
4
- // implement this function
5
- return ""
+ return phrase
+ .split(" ")
6
+ .filter { it.isNotEmpty() }
7
+ .map { it.first().uppercaseChar() }
8
+ .joinToString("")
9
}
0 commit comments