EmbeddingLevels

public struct EmbeddingLevels : RandomAccessCollection

A collection of the embedding levels of a paragraph, represented by UTF-16 code unit indices.

  • The number of elements in the collection.

    Declaration

    Swift

    public let count: Int
  • The index to the first element.

    Declaration

    Swift

    public var startIndex: Int { get }
  • The index after the last element.

    Declaration

    Swift

    public var endIndex: Int { get }
  • Accesses the embedding level at the specified character index.

    Declaration

    Swift

    public subscript(index: String.Index) -> UInt8 { get }

    Parameters

    index

    A valid character index of the source string. It must be within the paragraph’s range.

  • Accesses the embedding level at the specified position.

    Declaration

    Swift

    public subscript(index: Int) -> UInt8 { get }

    Parameters

    index

    The position of the element to access. index must be greater than or equal to startIndex and less than endIndex.