[gardening][Overlay] Prefer macOS over OSX for #available

This commit is contained in:
Sho Ikeda
2018-03-14 14:06:31 +09:00
parent 678ce48b26
commit f956609312
11 changed files with 28 additions and 28 deletions

View File

@@ -1638,7 +1638,7 @@ extension StringProtocol where Index == String.Index {
/// Equivalent to `self.rangeOfString(other) != nil`
public func contains<T : StringProtocol>(_ other: T) -> Bool {
let r = self.range(of: other) != nil
if #available(OSX 10.10, iOS 8.0, *) {
if #available(macOS 10.10, iOS 8.0, *) {
_sanityCheck(r == _ns.contains(other._ephemeralString))
}
return r
@@ -1661,7 +1661,7 @@ extension StringProtocol where Index == String.Index {
let r = self.range(
of: other, options: .caseInsensitive, locale: Locale.current
) != nil
if #available(OSX 10.10, iOS 8.0, *) {
if #available(macOS 10.10, iOS 8.0, *) {
_sanityCheck(r ==
_ns.localizedCaseInsensitiveContains(other._ephemeralString))
}