This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Foundation | |
extension NSPredicate { | |
static func equal(_ field: String, value: Any, caseInsensitive: Bool = false) -> NSPredicate { | |
let caseInsensitiveModifier = caseInsensitive ? "[c]" : "" | |
return NSPredicate(format: "%K ==\(caseInsensitiveModifier) %@", argumentArray: [field, value]) | |
} | |
static func notEqual(_ field: String, value: Any, caseInsensitive: Bool = false) -> NSPredicate { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// swiftlint:disable line_length | |
// swiftlint:disable variable_name | |
// swiftlint:disable large_tuple | |
import Foundation | |
#if os(iOS) || os(tvOS) || os(watchOS) | |
import UIKit | |
#elseif os(OSX) | |
import AppKit |
NewerOlder