Skip to content

Commit

Permalink
Fix a typo in the name of the transformingFirstLetter method (#90)
Browse files Browse the repository at this point in the history
### Motivation

Correct grammar.

### Modifications

Update method name inside of `fileprivate extension`.

### Result

Grammar fixed.

### Test Plan

n/a
  • Loading branch information
michalsrutek committed Jun 26, 2023
1 parent cc8e0ad commit 6b11135
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Sources/_OpenAPIGeneratorCore/Extensions/String.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ extension String {

/// Returns a copy of the string with the first letter uppercased.
var uppercasingFirstLetter: String {
tranformingFirstLetter { $0.uppercased() }
transformingFirstLetter { $0.uppercased() }
}

/// Returns a copy of the string with the first letter lowercased.
var lowercasingFirstLetter: String {
tranformingFirstLetter { $0.lowercased() }
transformingFirstLetter { $0.lowercased() }
}
}

Expand All @@ -44,7 +44,7 @@ fileprivate extension String {
/// Returns a copy of the string with the first letter modified by
/// the specified closure.
/// - Parameter transformation: A closure that modifies the first letter.
func tranformingFirstLetter<T>(_ transformation: (Character) -> T) -> String where T: StringProtocol {
func transformingFirstLetter<T>(_ transformation: (Character) -> T) -> String where T: StringProtocol {
guard let firstLetterIndex = self.firstIndex(where: \.isLetter) else {
return self
}
Expand Down

0 comments on commit 6b11135

Please sign in to comment.