mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-12-24 07:05:35 +00:00
Fix more warnings
This commit is contained in:
@@ -82,7 +82,7 @@ extension String {
|
||||
var pureNumber = self.replacingOccurrences( of: "[^0-9]", with: "", options: .regularExpression)
|
||||
for index in 0 ..< pattern.count {
|
||||
guard index < pureNumber.count else { return pureNumber }
|
||||
let stringIndex = String.Index(encodedOffset: index)
|
||||
let stringIndex = pattern.index(pattern.startIndex, offsetBy: index)
|
||||
let patternCharacter = pattern[stringIndex]
|
||||
guard patternCharacter != replacementCharacter else { continue }
|
||||
pureNumber.insert(patternCharacter, at: stringIndex)
|
||||
|
||||
Reference in New Issue
Block a user