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 f342396 commit 4d23610Copy full SHA for 4d23610
stdlib/public/core/StringUTF8View.swift
@@ -319,6 +319,17 @@ extension String.UTF8View {
319
320
extension String.UTF8View {
321
322
+ /// A span over the UTF8 code units that make up this string.
323
+ ///
324
+ /// - Note: In the case of bridged UTF16 String instances (on Apple
325
+ /// platforms,) this property transcodes the code units the first time
326
+ /// it is called. The transcoded buffer is cached, and subsequent calls
327
+ /// to `span` can reuse the buffer.
328
329
+ /// Returns: a `Span` over the UTF8 code units of this String.
330
331
+ /// Complexity: O(1) for native UTF8 Strings,
332
+ /// amortized O(1) for bridged UTF16 Strings.
333
@available(SwiftStdlib 6.2, *)
334
public var span: Span<UTF8.CodeUnit> {
335
@lifetime(borrow self)
0 commit comments