Skip to content

Commit 6422fbb

Browse files
committed
Remove the String ones not the NSString ones...
1 parent d23f4d7 commit 6422fbb

File tree

1 file changed

+0
-30
lines changed

1 file changed

+0
-30
lines changed

Foundation/NSString.swift

Lines changed: 0 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1479,36 +1479,6 @@ extension String : _NSBridgeable, _CFBridgeable {
14791479
internal var _cfObject: CFType { return _nsObject._cfObject }
14801480
}
14811481

1482-
#if !(os(OSX) || os(iOS))
1483-
extension String {
1484-
public func hasPrefix(_ prefix: String) -> Bool {
1485-
if prefix.isEmpty {
1486-
return true
1487-
}
1488-
1489-
let cfstring = self._cfObject
1490-
let range = CFRangeMake(0, CFStringGetLength(cfstring))
1491-
let opts = CFStringCompareFlags(
1492-
kCFCompareAnchored | kCFCompareNonliteral)
1493-
return CFStringFindWithOptions(cfstring, prefix._cfObject,
1494-
range, opts, nil)
1495-
}
1496-
1497-
public func hasSuffix(_ suffix: String) -> Bool {
1498-
if suffix.isEmpty {
1499-
return true
1500-
}
1501-
1502-
let cfstring = self._cfObject
1503-
let range = CFRangeMake(0, CFStringGetLength(cfstring))
1504-
let opts = CFStringCompareFlags(
1505-
kCFCompareAnchored | kCFCompareBackwards | kCFCompareNonliteral)
1506-
return CFStringFindWithOptions(cfstring, suffix._cfObject,
1507-
range, opts, nil)
1508-
}
1509-
}
1510-
#endif
1511-
15121482
extension NSString : _StructTypeBridgeable {
15131483
public typealias _StructType = String
15141484

0 commit comments

Comments
 (0)