/// <summary> /// Returns a reordered string for a piece of text (one or more paragraphs) set by <see cref="SetPara(string, byte, byte[])"/> or /// for a line of text set by <see cref="SetLine(int, int)"/>. /// </summary> /// <param name="options">Options for the reordering that control how the reordered text is written.</param> /// <returns>The reordered string</returns> public string GetReordered(CallReorderingOptions options) { var buff = new char[ProcessedLength * 2]; var len = NativeMethods.ubidi_writeReordered(_biDi, buff, buff.Length * 2, (ushort)options, out var errorCode); ExceptionFromErrorCode.ThrowIfError(errorCode, "BiDi reordering failed! " + errorCode); return(new string(buff, 0, len)); }