Refactor PasscodeUI

This commit is contained in:
Peter
2019-08-13 02:24:18 +03:00
parent a9ad5691f5
commit be0473cf85
25 changed files with 722 additions and 180 deletions

View File

@@ -0,0 +1,10 @@
import Foundation
public func convertToArabicNumeralString(_ string: String) -> String {
var string = string
let arabicNumbers = ["٠": "0", "١": "1", "٢": "2", "٣": "3", "٤": "4", "٥": "5", "٦": "6", "٧": "7", "٨": "8", "٩": "9"]
for (arabic, generic) in arabicNumbers {
string = string.replacingOccurrences(of: generic, with: arabic)
}
return string
}