Android.Text.BidiFormatter.UnicodeWrap Method
Formats a string of given directionality for use in plain-text output of the context directionality, so an opposite-directionality string is neither garbled nor garbles its surroundings.

Syntax

[Android.Runtime.Register("unicodeWrap", "(Ljava/lang/String;Landroid/text/TextDirectionHeuristic;Z)Ljava/lang/String;", "")]
public string UnicodeWrap (string str, ITextDirectionHeuristic heuristic, bool isolate)

Parameters

str
The input string.
heuristic
The algorithm to be used to estimate the string's overall direction. See Android.Text.TextDirectionHeuristics for pre-defined heuristics.
isolate
Whether to directionally isolate the string to prevent it from garbling the content around it

Returns

Documentation for this section has not yet been entered.

Remarks

Formats a string of given directionality for use in plain-text output of the context directionality, so an opposite-directionality string is neither garbled nor garbles its surroundings. This makes use of Unicode bidi formatting characters.

The algorithm: In case the given directionality doesn't match the context directionality, wraps the string with Unicode bidi formatting characters: RLE+str+PDF for RTL text, or LRE+str+PDF for LTR text.

If isolate, directionally isolates the string so that it does not garble its surroundings. Currently, this is done by "resetting" the directionality after the string by appending a trailing Unicode bidi mark matching the context directionality (LRM or RLM) when either the overall directionality or the exit directionality of the string is opposite to that of the context. If the formatter was built using NoType:android/text/BidiFormatter$Builder;Href=../../../reference/android/text/BidiFormatter.Builder.html#stereoReset(boolean) and passing "true" as an argument, also prepends a Unicode bidi mark matching the context directionality when either the overall directionality or the entry directionality of the string is opposite to that of the context. Note that as opposed to the overall directionality, the entry and exit directionalities are determined from the string itself.

Does *not* do HTML-escaping.

[Android Documentation]

Requirements

Namespace: Android.Text
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 18