File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
Sources/SwiftParserDiagnostics Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -191,8 +191,8 @@ public extension SwiftSyntax.LexerError {
191
191
}
192
192
let replacedText =
193
193
text
194
- . replacingFirstOccurance ( of: " “ " , with: #"""# )
195
- . replacingLastOccurance ( of: " ” " , with: #"""# )
194
+ . replacingFirstOccurence ( of: " “ " , with: #"""# )
195
+ . replacingLastOccurence ( of: " ” " , with: #"""# )
196
196
197
197
let fixedToken = token. withKind ( TokenKind . fromRaw ( kind: rawKind, text: replacedText) )
198
198
return [
Original file line number Diff line number Diff line change @@ -19,14 +19,14 @@ extension String {
19
19
}
20
20
}
21
21
22
- func replacingFirstOccurance ( of character: Character , with replacement: Character ) -> String {
22
+ func replacingFirstOccurence ( of character: Character , with replacement: Character ) -> String {
23
23
guard let match = self . firstIndex ( of: character) else {
24
24
return self
25
25
}
26
26
return self [ startIndex..< match] + String( replacement) + self [ index ( after: match) ... ]
27
27
}
28
28
29
- func replacingLastOccurance ( of character: Character , with replacement: Character ) -> String {
29
+ func replacingLastOccurence ( of character: Character , with replacement: Character ) -> String {
30
30
guard let match = self . lastIndex ( of: character) else {
31
31
return self
32
32
}
You can’t perform that action at this time.
0 commit comments