Skip to content

Commit 095109d

Browse files
committed
solve JadenCase with kotlin
1 parent 71a9720 commit 095109d

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
class Solution {
2+
fun solution(s: String): String =
3+
s.lowercase().split(" ").joinToString(" ") {
4+
if (it.isNotEmpty())
5+
"${it[0].uppercase()}${it.substring(1)}"
6+
else
7+
it
8+
}
9+
}

0 commit comments

Comments
 (0)