mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
Removing dead code part 2 (#2235)
Co-authored-by: Doug <6060466+pixlwave@users.noreply.github.com>
This commit is contained in:
@@ -18,23 +18,11 @@ import Foundation
|
||||
|
||||
/// NSRegularExpressions work internally on NSStrings, we need to be careful how we build the ranges for extended grapheme clusters https://stackoverflow.com/a/27880748/730924
|
||||
extension NSRegularExpression {
|
||||
func enumerateMatches(in string: String, options: NSRegularExpression.MatchingOptions = [], using block: (NSTextCheckingResult?, NSRegularExpression.MatchingFlags, UnsafeMutablePointer<ObjCBool>) -> Void) {
|
||||
enumerateMatches(in: string, options: options, range: .init(location: 0, length: (string as NSString).length), using: block)
|
||||
}
|
||||
|
||||
func matches(in string: String, options: NSRegularExpression.MatchingOptions = []) -> [NSTextCheckingResult] {
|
||||
matches(in: string, options: options, range: .init(location: 0, length: (string as NSString).length))
|
||||
}
|
||||
|
||||
func numberOfMatches(in string: String, options: NSRegularExpression.MatchingOptions = []) -> Int {
|
||||
numberOfMatches(in: string, options: options, range: .init(location: 0, length: (string as NSString).length))
|
||||
}
|
||||
|
||||
func firstMatch(in string: String, options: NSRegularExpression.MatchingOptions = []) -> NSTextCheckingResult? {
|
||||
firstMatch(in: string, options: options, range: .init(location: 0, length: (string as NSString).length))
|
||||
}
|
||||
|
||||
func rangeOfFirstMatch(in string: String, options: NSRegularExpression.MatchingOptions = []) -> NSRange {
|
||||
rangeOfFirstMatch(in: string, options: options, range: .init(location: 0, length: (string as NSString).length))
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user