reorderVisual method

ReorderedIndexMap reorderVisual(
  1. List<int> levels
)

Utility function for producing reorderings given a list of levels

Produces a map saying which visual index maps to which source index.

The levels array must not have values greater than 126 (this is the Bidi maximum explicit depth plus one). Failure to follow this invariant may lead to incorrect results, but is still safe.

See the Rust documentation for reorder_visual for more information.

Implementation

ReorderedIndexMap reorderVisual(core.List<int> levels) {
  final temp = _FinalizedArena();
  final result = _icu4x_Bidi_reorder_visual_mv1(_ffi, levels._uint8AllocIn(temp.arena));
  return ReorderedIndexMap._fromFfi(result, []);
}