File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -414,11 +414,11 @@ extension String {
414414 if ptr != nil {
415415 return try body ( UnsafeBufferPointer ( start: ptr, count: _core. count) )
416416 }
417- var nulTerminatedUTF8 = ContiguousArray < UTF8 . CodeUnit > ( )
418- nulTerminatedUTF8 . reserveCapacity ( utf8. count + 1 )
419- nulTerminatedUTF8 += utf8
420- nulTerminatedUTF8 . append ( 0 )
421- return try nulTerminatedUTF8 . withUnsafeBufferPointer ( body)
417+ var nullTerminatedUTF8 = ContiguousArray < UTF8 . CodeUnit > ( )
418+ nullTerminatedUTF8 . reserveCapacity ( utf8. count + 1 )
419+ nullTerminatedUTF8 += utf8
420+ nullTerminatedUTF8 . append ( 0 )
421+ return try nullTerminatedUTF8 . withUnsafeBufferPointer ( body)
422422 }
423423
424424 /// Creates a string corresponding to the given sequence of UTF-8 code units.
@@ -720,9 +720,4 @@ extension String {
720720 public var nulTerminatedUTF8 : ContiguousArray < UTF8 . CodeUnit > {
721721 Builtin . unreachable ( )
722722 }
723-
724- @available ( * , unavailable, renamed: " utf8CString " )
725- public var nulTerminatedUTF8CString : ContiguousArray < CChar > {
726- Builtin . unreachable ( )
727- }
728723}
You can’t perform that action at this time.
0 commit comments