File tree Expand file tree Collapse file tree 1 file changed +0
-30
lines changed
Expand file tree Collapse file tree 1 file changed +0
-30
lines changed Original file line number Diff line number Diff 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-
15121482extension NSString : _StructTypeBridgeable {
15131483 public typealias _StructType = String
15141484
You can’t perform that action at this time.
0 commit comments