Taal

BidiOptions Enum

Definition

Defines base-direction values, a missing-position result, and options for bidirectional reordering.

public enum BidiOptions
type BidiOptions = 
Inheritance
BidiOptions

Fields

Name Value Description
MapNowhere -1

Special value which can be returned by the mapping methods when a logical index has no corresponding visual index or vice-versa. This may happen for the logical-to-visual mapping of a Bidi control when option OPTION_REMOVE_CONTROLS is specified. This can also happen for the visual-to-logical mapping of a Bidi mark (LRM or RLM) inserted by option OPTION_INSERT_MARKS.

Android reference for android.icu.text.Bidi.MAP_NOWHERE.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

DirectionLeftToRight 0

Constant indicating base direction is left-to-right.

Android reference for android.icu.text.Bidi.DIRECTION_LEFT_TO_RIGHT.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

OptionDefault 0

Use with ReorderingOptions to disable all reordering options.

Android reference for android.icu.text.Bidi.OPTION_DEFAULT.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

DirectionRightToLeft 1

Constant indicating base direction is right-to-left.

Android reference for android.icu.text.Bidi.DIRECTION_RIGHT_TO_LEFT.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

OptionInsertMarks 1

Option bit for ReorderingOptions: insert Bidi marks (LRM or RLM) when needed to ensure correct result of a reordering to a Logical order. This option must be set or reset before calling Bidi.SetPara. This option is significant only with reordering modes which generate a result with Logical order, specifically: ReorderRunsOnly, ReorderInverseNumbersAsL, ReorderInverseLikeDirect, and ReorderInverseForNumbersSpecial. If this option is set in conjunction with reordering mode ReorderInverseNumbersAsL or with Inverse set to true, it implies option InsertLrmForNumeric in calls to WriteReordered(BidiOptions). For other reordering modes, a minimum number of LRM or RLM characters will be added to the source text after reordering it so as to ensure round trip, i.e. when applying the inverse reordering mode on the resulting logical text with removal of Bidi marks (option OptionRemoveControls set before calling Bidi.SetPara or option RemoveBidiControls in WriteReordered(BidiOptions)), the result will be identical to the source text in the first transformation. This option will be ignored if specified together with option OptionRemoveControls. It inhibits option RemoveBidiControls in calls to WriteReordered(BidiOptions) and it implies option InsertLrmForNumeric in calls to that method if the reordering mode is ReorderInverseNumbersAsL. Cast the write option constants to BidiOptions when passing them to that method.

Android reference for android.icu.text.Bidi.OPTION_INSERT_MARKS.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

OptionRemoveControls 2

Option bit for ReorderingOptions: remove Bidi control characters. This option must be set or reset before calling Bidi.SetPara. This option nullifies option OptionInsertMarks. It inhibits option InsertLrmForNumeric in calls to WriteReordered(BidiOptions) and it implies option RemoveBidiControls in calls to that method. Cast the write option constants to BidiOptions when passing them to that method.

Android reference for android.icu.text.Bidi.OPTION_REMOVE_CONTROLS.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

OptionStreaming 4

Option bit for ReorderingOptions: process the output as part of a stream to be continued. This option must be set or reset before calling Bidi.SetPara. This option specifies that the caller is interested in processing large text object in parts. The results of the successive calls are expected to be concatenated by the caller. Only the call for the last part will have this option bit off. When this option bit is on, Bidi.SetPara may process less than the full source text in order to truncate the text at a meaningful boundary. The caller should read ProcessedLength immediately after calling Bidi.SetPara in order to determine how much of the source text has been processed. Source text beyond that length should be resubmitted in following calls to Bidi.SetPara. The processed length may be less than the length of the source text if a character preceding the last character of the source text constitutes a reasonable boundary (like a block separator) for text to be continued. If the last character of the source text constitutes a reasonable boundary, the whole text will be processed at once. If nowhere in the source text there exists such a reasonable boundary, the processed length will be zero. The caller should check for such an occurrence and do one of the following: submit a larger amount of text with a better chance to include a reasonable boundary, or resubmit the same text after turning off OptionStreaming. In all cases, this option should be turned off before processing the last part of the text. When the OptionStreaming option is used, it is recommended to call OrderParagraphsLTR(Boolean) with true before calling Bidi.SetPara so that later paragraphs may be concatenated to previous paragraphs on the right.

Android reference for android.icu.text.Bidi.OPTION_STREAMING.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

DirectionDefaultLeftToRight 126

Constant indicating that the base direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm. If no strong directional character is present, the base direction is left-to-right.

Android reference for android.icu.text.Bidi.DIRECTION_DEFAULT_LEFT_TO_RIGHT.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

DirectionDefaultRightToLeft 127

Constant indicating that the base direction depends on the first strong directional character in the text according to the Unicode Bidirectional Algorithm. If no strong directional character is present, the base direction is right-to-left.

Android reference for android.icu.text.Bidi.DIRECTION_DEFAULT_RIGHT_TO_LEFT.

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Remarks

The direction values and MapNowhere are not reordering flags. Use only the Option values with ReorderingOptions.

Applies to