Share via


BreakIterator.SetText Method

Definition

Overloads

SetText(ICharSequence)

Sets the iterator to analyze a new piece of text.

SetText(String)

Sets the iterator to analyze a new piece of text.

SetText(ICharSequence)

Sets the iterator to analyze a new piece of text.

[Android.Runtime.Register("setText", "(Ljava/lang/CharSequence;)V", "GetSetText_Ljava_lang_CharSequence_Handler", ApiSince=29)]
public virtual void SetText (Java.Lang.ICharSequence? newText);
[<Android.Runtime.Register("setText", "(Ljava/lang/CharSequence;)V", "GetSetText_Ljava_lang_CharSequence_Handler", ApiSince=29)>]
abstract member SetText : Java.Lang.ICharSequence -> unit
override this.SetText : Java.Lang.ICharSequence -> unit

Parameters

newText
ICharSequence

A CharSequence containing the text to analyze with this BreakIterator.

Attributes

Remarks

Sets the iterator to analyze a new piece of text. The new piece of text is passed in as a CharSequence, and the current iteration position is reset to the beginning of the text. (The old text is dropped.)

The text underlying the CharSequence must not be be modified while the BreakIterator holds a references to it. (As could possibly occur with a StringBuilder, for example).

Java documentation for android.icu.text.BreakIterator.setText(java.lang.CharSequence).

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.

Applies to

SetText(String)

Sets the iterator to analyze a new piece of text.

[Android.Runtime.Register("setText", "(Ljava/lang/String;)V", "GetSetText_Ljava_lang_String_Handler", ApiSince=24)]
public virtual void SetText (string? newText);
[<Android.Runtime.Register("setText", "(Ljava/lang/String;)V", "GetSetText_Ljava_lang_String_Handler", ApiSince=24)>]
abstract member SetText : string -> unit
override this.SetText : string -> unit

Parameters

newText
String

A String containing the text to analyze with this BreakIterator.

Attributes

Remarks

Sets the iterator to analyze a new piece of text. The new piece of text is passed in as a String, and the current iteration position is reset to the beginning of the string. (The old text is dropped.)

Java documentation for android.icu.text.BreakIterator.setText(java.lang.String).

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.

Applies to