Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
clintonpi committed Oct 4, 2024
1 parent 0c3dc30 commit 2a9231d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Sources/GRPCProtobufCodeGen/CamelCaser.swift
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ package struct CamelCaser {
return input
} else if indexOfFirstLowercase == input.index(after: input.startIndex) {
// The second character in `input` is lower case. As in: "ImportCSV".
return input[input.startIndex].lowercased() + input[indexOfFirstLowercase...] // -> "importCSV"
// returns "importCSV"
return input[input.startIndex].lowercased() + input[indexOfFirstLowercase...]
} else {
// The first lower case character is further within `input`. Tentatively, `input` begins
// with one or more abbreviations. Therefore, the last encountered upper case character
Expand All @@ -35,7 +36,8 @@ package struct CamelCaser {
let leadingAbbreviation = input[..<input.index(before: indexOfFirstLowercase)]
let followingWords = input[input.index(before: indexOfFirstLowercase)...]

return leadingAbbreviation.lowercased() + followingWords // -> "foobarImportCSV"
// returns "foobarImportCSV"
return leadingAbbreviation.lowercased() + followingWords
}
}
}

0 comments on commit 2a9231d

Please sign in to comment.