BidiParagraph

public class BidiParagraph

A BidiParagraph object represents a single paragraph of text processed with rules X1-I2 of Unicode Bidirectional Algorithm. It contains the resolved embedding levels of all the characters of a paragraph and provides the facility to query them or iterate over their runs.

  • The UTF-16 range of this paragraph in source string.

    Declaration

    Swift

    public var codeUnitRange: Range<Int> { get }
  • The index to the first character of this paragraph in source string.

    Declaration

    Swift

    public var startIndex: String.Index { get }
  • The index after the last character of this paragraph in source string.

    Declaration

    Swift

    public var endIndex: String.Index { get }
  • The base level of this paragraph.

    Declaration

    Swift

    public var baseLevel: UInt8 { get }
  • The collection containing the levels of all characters in this paragraph.

    Declaration

    Swift

    public var embeddingLevels: EmbeddingLevels { get }
  • The sequence of logically ordered runs in this paragraph.

    Declaration

    Swift

    public var logicalRuns: RunSequence { get }
  • Creates a line object of specified range by applying Rules L1-L2 of Unicode Bidirectional Algorithm.

    Declaration

    Swift

    public func makeLine(codeUnitRange: Range<Int>) -> BidiLine?

    Parameters

    codeUnitRange

    The UTF-16 range of the line in source string.

    Return Value

    A line object processed with Rules L1-L2 of Unicode Bidirectional Algorithm.

  • Creates a line object of specified range by applying Rules L1-L2 of Unicode Bidirectional Algorithm.

    Declaration

    Swift

    public func makeLine(characterRange: Range<String.Index>) -> BidiLine?

    Parameters

    characterRange

    The character range of the line in source string.

    Return Value

    A line object processed with Rules L1-L2 of Unicode Bidirectional Algorithm.

EmbeddingLevels

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

    See more

    Declaration

    Swift

    public struct EmbeddingLevels : RandomAccessCollection

RunSequence