We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fba8095 commit a086dc1Copy full SHA for a086dc1
stdlib/public/core/StringBridge.swift
@@ -661,6 +661,19 @@ internal func _SwiftCreateBridgedString_DoNotCall(
661
return Unmanaged<AnyObject>.passRetained(str._bridgeToObjectiveCImpl())
662
}
663
664
+@available(SwiftStdlib 6.1, *)
665
+@_spi(Foundation) public func _SwiftCreateImmortalString_ForFoundation(
666
+ buffer: UnsafeBufferPointer<UInt8>,
667
+ isASCII: Bool
668
+) -> String? {
669
+ switch validateUTF8(buffer) {
670
+ case success(let extraInfo):
671
+ return String(_StringGuts(buffer, isASCII: isASCII || extraInfo.isASCII))
672
+ default:
673
+ return nil
674
+ }
675
+}
676
+
677
// At runtime, this class is derived from `__SwiftNativeNSStringBase`,
678
// which is derived from `NSString`.
679
//
0 commit comments