TextGranularity

public extension TextGranularity
  • Cast constructor, converting any binary integer to a TextGranularity.

    Declaration

    Swift

    @inlinable
    init!<I>(_ raw: I) where I : BinaryInteger

    Parameters

    raw

    The raw integer value to initialise the enum from

  • Granularity is defined by the boundaries between characters (including non-printing characters)

    Declaration

    Swift

    static let char: AtkTextGranularity
  • Granularity is defined by the boundaries of a word, starting at the beginning of the current word and finishing at the beginning of the following one, if present.

    Declaration

    Swift

    static let word: AtkTextGranularity
  • Granularity is defined by the boundaries of a sentence, starting at the beginning of the current sentence and finishing at the beginning of the following one, if present.

    Declaration

    Swift

    static let sentence: AtkTextGranularity
  • Granularity is defined by the boundaries of a line, starting at the beginning of the current line and finishing at the beginning of the following one, if present.

    Declaration

    Swift

    static let line: AtkTextGranularity
  • Granularity is defined by the boundaries of a paragraph, starting at the beginning of the current paragraph and finishing at the beginning of the following one, if present.

    Declaration

    Swift

    static let paragraph: AtkTextGranularity