Class ReorderedIndexMap

Thin wrapper around a vector that maps visual indices to source indices

map[visualIndex] = sourceIndex

Produced by reorder_visual() on [Bidi].

Constructors

Accessors

  • get asSlice(): number[]
  • Get this as a slice/array of indices

    Returns number[]

  • get ffiValue(): number
  • Returns number

  • get isEmpty(): boolean
  • Whether this map is empty

    Returns boolean

  • get length(): number
  • The length of this map

    Returns number

Methods

  • Get element at index. Returns 0 when out of bounds (note that 0 is also a valid in-bounds value, please use len() to avoid out-of-bounds)

    Parameters

    • index: number

    Returns number

""