diff --git a/Sources/Future/RawSpan.swift b/Sources/Future/RawSpan.swift index efeac940..14eb7d96 100644 --- a/Sources/Future/RawSpan.swift +++ b/Sources/Future/RawSpan.swift @@ -442,6 +442,10 @@ extension RawSpan { /// If the maximum length exceeds the length of this span, /// the result contains all the bytes. /// + /// The returned span's first byte is always at offset 0; unlike buffer + /// slices, extracted spans do not share their indices with the + /// span from which they are extracted. + /// /// - Parameter maxLength: The maximum number of bytes to return. /// `maxLength` must be greater than or equal to zero. /// - Returns: A span with at most `maxLength` bytes. @@ -458,6 +462,10 @@ extension RawSpan { /// If the number of elements to drop exceeds the number of elements in /// the span, the result is an empty span. /// + /// The returned span's first byte is always at offset 0; unlike buffer + /// slices, extracted spans do not share their indices with the + /// span from which they are extracted. + /// /// - Parameter k: The number of bytes to drop off the end of /// the span. `k` must be greater than or equal to zero. /// - Returns: A span leaving off the specified number of bytes at the end. @@ -475,6 +483,10 @@ extension RawSpan { /// If the maximum length exceeds the length of this span, /// the result contains all the bytes. /// + /// The returned span's first byte is always at offset 0; unlike buffer + /// slices, extracted spans do not share their indices with the + /// span from which they are extracted. + /// /// - Parameter maxLength: The maximum number of bytes to return. /// `maxLength` must be greater than or equal to zero. /// - Returns: A span with at most `maxLength` bytes. @@ -492,6 +504,10 @@ extension RawSpan { /// If the number of elements to drop exceeds the number of bytes in /// the span, the result is an empty span. /// + /// The returned span's first byte is always at offset 0; unlike buffer + /// slices, extracted spans do not share their indices with the + /// span from which they are extracted. + /// /// - Parameter k: The number of bytes to drop from the beginning of /// the span. `k` must be greater than or equal to zero. /// - Returns: A span starting after the specified number of bytes. diff --git a/Sources/Future/Span.swift b/Sources/Future/Span.swift index b7859ddd..7ea060e0 100644 --- a/Sources/Future/Span.swift +++ b/Sources/Future/Span.swift @@ -605,6 +605,10 @@ extension Span where Element: ~Copyable /*& ~Escapable*/ { /// If the maximum length exceeds the length of this span, /// the result contains all the elements. /// + /// The returned span's first item is always at offset 0; unlike buffer + /// slices, extracted spans do not share their indices with the + /// span from which they are extracted. + /// /// - Parameter maxLength: The maximum number of elements to return. /// `maxLength` must be greater than or equal to zero. /// - Returns: A span with at most `maxLength` elements. @@ -621,6 +625,10 @@ extension Span where Element: ~Copyable /*& ~Escapable*/ { /// If the number of elements to drop exceeds the number of elements in /// the span, the result is an empty span. /// + /// The returned span's first item is always at offset 0; unlike buffer + /// slices, extracted spans do not share their indices with the + /// span from which they are extracted. + /// /// - Parameter k: The number of elements to drop off the end of /// the span. `k` must be greater than or equal to zero. /// - Returns: A span leaving off the specified number of elements at the end. @@ -638,6 +646,10 @@ extension Span where Element: ~Copyable /*& ~Escapable*/ { /// If the maximum length exceeds the length of this span, /// the result contains all the elements. /// + /// The returned span's first item is always at offset 0; unlike buffer + /// slices, extracted spans do not share their indices with the + /// span from which they are extracted. + /// /// - Parameter maxLength: The maximum number of elements to return. /// `maxLength` must be greater than or equal to zero. /// - Returns: A span with at most `maxLength` elements. @@ -655,6 +667,10 @@ extension Span where Element: ~Copyable /*& ~Escapable*/ { /// If the number of elements to drop exceeds the number of elements in /// the span, the result is an empty span. /// + /// The returned span's first item is always at offset 0; unlike buffer + /// slices, extracted spans do not share their indices with the + /// span from which they are extracted. + /// /// - Parameter k: The number of elements to drop from the beginning of /// the span. `k` must be greater than or equal to zero. /// - Returns: A span starting after the specified number of elements.