Skip to content

Commit

Permalink
Add deprecated method for spelling fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mattmassicotte committed Nov 21, 2022
1 parent 4b74631 commit b7b3fc5
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Sources/TextStory/TextStoring+Ranges.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
import Foundation

public extension TextStoring {
@available(*, deprecated, message: "Please use the correctly-spelled findPrecedingOccurrenceOfCharacter")
func findPreceedingOccurrenceOfCharacter(in set: CharacterSet, from location: Int) -> Int? {
return findPrecedingOccurrenceOfCharacter(in: set, from: location)
}

func findPrecedingOccurrenceOfCharacter(in set: CharacterSet, from location: Int) -> Int? {
var checkLoc = min(location - 1, length - 1)

Expand Down

0 comments on commit b7b3fc5

Please sign in to comment.