startIndex
TypeScriptget startIndex(): numberSwift declarationvar startIndex: DispatchData.Index { get }The position of the first element in a nonempty collection. If the collection is empty, `startIndex` is equal to `endIndex`.
struct · iOS 2.0+ · SDK 27.1
struct Regionget startIndex(): numberSwift declarationvar startIndex: DispatchData.Index { get }The position of the first element in a nonempty collection. If the collection is empty, `startIndex` is equal to `endIndex`.
withUnsafeBytes(body: ((arg0: ArrayBuffer) => unknown)): unknownSwift declarationfunc withUnsafeBytes<ResultType>(_ body: (UnsafeRawBufferPointer) throws -> ResultType) rethrows -> ResultTypeCalls the given closure with the contents of underlying storage. - note: Calling `withUnsafeBytes` multiple times does not guarantee that the same buffer pointer will be passed in every time. - warning: The buffer argument to the body should not be stored or used outside of the lifetime of the call to the closure. Clients should prefer the `withBytes` function to this one, because `withBytes` uses the non-escapable type `RawSpan` to ensure that the buffer argument is not stored outside of the closure.
get regions(): SDKHandleSwift declarationvar regions: CollectionOfOne<DispatchData.Region> { get }A collection of buffers that make up the whole of the type conforming to a data protocol.
get endIndex(): numberSwift declarationvar endIndex: DispatchData.Index { get }The collection's "past the end" position---that is, the position one greater than the last valid subscript argument. When you need a range that includes the last element of a collection, use the half-open range operator (`..<`) with `endIndex`. The `..<` operator creates a range that doesn't include the upper bound, so it's always safe to use with `endIndex`. For example: let numbers = [10, 20, 30, 40, 50] if let index = numbers.firstIndex(of: 30) { print(numbers[index ..< numbers.endIndex]) } // Prints "[30, 40, 50]" If the collection is empty, `endIndex` is equal to `startIndex`.
subscript(position: number): numberSwift declarationsubscript(position: DispatchData.Index) -> UInt8 { get }Accesses the element at the specified position. The following example accesses an element of an array through its subscript to print its value: var streets = ["Adams", "Bryant", "Channing", "Douglas", "Evarts"] print(streets[1]) // Prints "Bryant" You can subscript a collection with any valid index other than the collection's end index. The end index refers to the position one past the last element of a collection, so it doesn't correspond with an element. - Parameter position: The position of the element to access. `position` must be a valid index of the collection that is not equal to the `endIndex` property. - Complexity: O(1)
No declarations were skipped in this snapshot.