lowerwith ios9.0
public func containsIgnoreCase(_ seq: String ) -> Bool {
// used to check presence of </title>, </style>. only finds consistent case.
if #available(iOS 9.0, *) {
let loScan = seq.lowercased(with: Locale(identifier: "en"))
let hiScan = seq.uppercased(with: Locale(identifier: "eng"))
return nextIndexOf(loScan) != nil || nextIndexOf(hiScan) != nil
} else {
return false
// Fallback on earlier versions
}
}