@@ -297,7 +297,7 @@ open class NSString : NSObject, NSCopying, NSMutableCopying, NSSecureCoding, NSC
297
297
298
298
internal func _fastCStringContents( _ nullTerminated: Bool ) -> UnsafePointer < Int8 > ? {
299
299
if type ( of: self ) == NSString . self || type ( of: self ) == NSMutableString . self {
300
- if _storage. _core . isASCII {
300
+ if _storage. _guts . _isContiguousASCII {
301
301
return unsafeBitCast ( _storage. _core. startASCII, to: UnsafePointer< Int8> . self )
302
302
}
303
303
}
@@ -306,7 +306,7 @@ open class NSString : NSObject, NSCopying, NSMutableCopying, NSSecureCoding, NSC
306
306
307
307
internal var _fastContents : UnsafePointer < UniChar > ? {
308
308
if type ( of: self ) == NSString . self || type ( of: self ) == NSMutableString . self {
309
- if ! _storage. _core . isASCII {
309
+ if _storage. _guts . _isContiguousUTF16 {
310
310
return UnsafePointer < UniChar > ( _storage. _core. startUTF16)
311
311
}
312
312
}
@@ -315,7 +315,7 @@ open class NSString : NSObject, NSCopying, NSMutableCopying, NSSecureCoding, NSC
315
315
316
316
internal var _encodingCantBeStoredInEightBitCFString : Bool {
317
317
if type ( of: self ) == NSString . self || type ( of: self ) == NSMutableString . self {
318
- return !_storage. _core . isASCII
318
+ return !_storage. _guts . _isContiguousASCII
319
319
}
320
320
return false
321
321
}
@@ -858,7 +858,7 @@ extension NSString {
858
858
public func getCString( _ buffer: UnsafeMutablePointer < Int8 > , maxLength maxBufferCount: Int , encoding: UInt ) -> Bool {
859
859
var used = 0
860
860
if type ( of: self ) == NSString . self || type ( of: self ) == NSMutableString . self {
861
- if _storage. _core . isASCII {
861
+ if _storage. _guts . _isContiguousASCII {
862
862
used = min ( self . length, maxBufferCount - 1 )
863
863
_storage. _core. startASCII. withMemoryRebound ( to: Int8 . self,
864
864
capacity: used) {
0 commit comments