Skip to content

Commit de5e2e8

Browse files
committed
scalafmt
1 parent cd32dfb commit de5e2e8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scala-strings/src/main/scala/com/baeldung/scala/strings/capitalize/CapitalizeWords.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ object CapitalizeWords {
2020

2121
def capitalizeWordsPreserveSpaces(sentence: String): String = {
2222
sentence.zipWithIndex.map { (char, index) =>
23-
if(index == 0) char.toUpper
24-
else if(sentence.charAt(index-1).isSpaceChar) char.toUpper
23+
if (index == 0) char.toUpper
24+
else if (sentence.charAt(index - 1).isSpaceChar) char.toUpper
2525
else char
2626
}.mkString
2727
}

0 commit comments

Comments
 (0)