BidiLine
public class BidiLine
A BidiLine
object represents a single line processed with rules L1-L2 of Unicode Bidirectional
Algorithm. Instead of reordering the characters as stated by rule L2, it allows to query and
iterate over reordered level runs. The caller is responsible to reorder the characters manually,
if required.
-
The UTF-16 range of this line in source string.
Declaration
Swift
public var codeUnitRange: Range<Int> { get }
-
The index to the first character of this line in source string.
Declaration
Swift
public var startIndex: String.Index { get }
-
The index after the last character of this line in source string.
Declaration
Swift
public var endIndex: String.Index { get }
-
The collection of visually ordered runs in this line.
Declaration
Swift
public var visualRuns: VisualRuns { get }
-
The sequence of mirroring pairs in this line. You can use it to implement Rule L4 of Unicode Bidirectional Algorithm.
Declaration
Swift
public var mirroringPairs: MirrorSequence { get }
-
A collection of visually ordered runs in a line.
See moreDeclaration
Swift
public struct VisualRuns : RandomAccessCollection