UnicodeSetSpanner.ReplaceFrom Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
| Name | Description |
|---|---|
| ReplaceFrom(String, String, UnicodeSetSpanner+CountMethod, UnicodeSet+SpanCondition) |
Replaces spans selected by the supplied condition and counting method. |
| ReplaceFrom(ICharSequence, ICharSequence, UnicodeSetSpanner+CountMethod, UnicodeSet+SpanCondition) |
Replace all matching spans in sequence by replacement, according to the countMethod and spanCondition. |
| ReplaceFrom(String, String, UnicodeSetSpanner+CountMethod) |
Replaces selected spans using simple spanning and the supplied counting method. |
| ReplaceFrom(ICharSequence, ICharSequence) |
Replace all matching spans in sequence by the replacement, counting by CountMethod. |
| ReplaceFrom(String, String) |
Replace all matching spans in sequence by the replacement, counting by CountMethod. |
| ReplaceFrom(ICharSequence, ICharSequence, UnicodeSetSpanner+CountMethod) |
Replace all matching spans in sequence by replacement, according to the CountMethod, using SpanCondition.SIMPLE. |
ReplaceFrom(String, String, UnicodeSetSpanner+CountMethod, UnicodeSet+SpanCondition)
Replaces spans selected by the supplied condition and counting method.
public string? ReplaceFrom(string? sequence, string? replacement, Android.Icu.Text.UnicodeSetSpanner.CountMethod? countMethod, Android.Icu.Text.UnicodeSet.SpanCondition? spanCondition);
member this.ReplaceFrom : string * string * Android.Icu.Text.UnicodeSetSpanner.CountMethod * Android.Icu.Text.UnicodeSet.SpanCondition -> string
Parameters
- sequence
- String
The managed string in which selected spans are replaced.
- replacement
- String
The text inserted for each counted item; an empty string deletes the selected spans.
- countMethod
- UnicodeSetSpanner.CountMethod
Selects one replacement per complete span or one per counted element.
- spanCondition
- UnicodeSet.SpanCondition
Selects the contained or noncontained spans to replace.
Returns
The resulting string after the selected replacements.
Remarks
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
ReplaceFrom(ICharSequence, ICharSequence, UnicodeSetSpanner+CountMethod, UnicodeSet+SpanCondition)
Replace all matching spans in sequence by replacement, according to the countMethod and spanCondition.
[Android.Runtime.Register("replaceFrom", "(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/icu/text/UnicodeSetSpanner$CountMethod;Landroid/icu/text/UnicodeSet$SpanCondition;)Ljava/lang/String;", "GetReplaceFrom_Ljava_lang_CharSequence_Ljava_lang_CharSequence_Landroid_icu_text_UnicodeSetSpanner_CountMethod_Landroid_icu_text_UnicodeSet_SpanCondition_Handler", ApiSince=24)]
public virtual string? ReplaceFrom(Java.Lang.ICharSequence? sequence, Java.Lang.ICharSequence? replacement, Android.Icu.Text.UnicodeSetSpanner.CountMethod? countMethod, Android.Icu.Text.UnicodeSet.SpanCondition? spanCondition);
[<Android.Runtime.Register("replaceFrom", "(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/icu/text/UnicodeSetSpanner$CountMethod;Landroid/icu/text/UnicodeSet$SpanCondition;)Ljava/lang/String;", "GetReplaceFrom_Ljava_lang_CharSequence_Ljava_lang_CharSequence_Landroid_icu_text_UnicodeSetSpanner_CountMethod_Landroid_icu_text_UnicodeSet_SpanCondition_Handler", ApiSince=24)>]
abstract member ReplaceFrom : Java.Lang.ICharSequence * Java.Lang.ICharSequence * Android.Icu.Text.UnicodeSetSpanner.CountMethod * Android.Icu.Text.UnicodeSet.SpanCondition -> string
override this.ReplaceFrom : Java.Lang.ICharSequence * Java.Lang.ICharSequence * Android.Icu.Text.UnicodeSetSpanner.CountMethod * Android.Icu.Text.UnicodeSet.SpanCondition -> string
Parameters
- sequence
- ICharSequence
charsequence to replace matching spans in.
- replacement
- ICharSequence
replacement sequence. To delete, use ""
- countMethod
- UnicodeSetSpanner.CountMethod
whether to treat an entire span as a match, or individual elements as matches
- spanCondition
- UnicodeSet.SpanCondition
specify whether to modify the matching spans (CONTAINED or SIMPLE) or the non-matching (NOT_CONTAINED)
Returns
modified string.
- Attributes
Remarks
Replace all matching spans in sequence by replacement, according to the countMethod and spanCondition. The code alternates spans; see the class doc for UnicodeSetSpanner for a note about boundary conditions.
Android reference for android.icu.text.UnicodeSetSpanner.replaceFrom.
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
ReplaceFrom(String, String, UnicodeSetSpanner+CountMethod)
Replaces selected spans using simple spanning and the supplied counting method.
public string? ReplaceFrom(string? sequence, string? replacement, Android.Icu.Text.UnicodeSetSpanner.CountMethod? countMethod);
member this.ReplaceFrom : string * string * Android.Icu.Text.UnicodeSetSpanner.CountMethod -> string
Parameters
- sequence
- String
The managed string in which selected spans are replaced.
- replacement
- String
The text inserted for each counted item; an empty string deletes the selected spans.
- countMethod
- UnicodeSetSpanner.CountMethod
Selects one replacement per complete span or one per counted element.
Returns
The resulting string after the selected replacements.
Remarks
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
ReplaceFrom(ICharSequence, ICharSequence)
Replace all matching spans in sequence by the replacement, counting by CountMethod.
[Android.Runtime.Register("replaceFrom", "(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;", "GetReplaceFrom_Ljava_lang_CharSequence_Ljava_lang_CharSequence_Handler", ApiSince=24)]
public virtual string? ReplaceFrom(Java.Lang.ICharSequence? sequence, Java.Lang.ICharSequence? replacement);
[<Android.Runtime.Register("replaceFrom", "(Ljava/lang/CharSequence;Ljava/lang/CharSequence;)Ljava/lang/String;", "GetReplaceFrom_Ljava_lang_CharSequence_Ljava_lang_CharSequence_Handler", ApiSince=24)>]
abstract member ReplaceFrom : Java.Lang.ICharSequence * Java.Lang.ICharSequence -> string
override this.ReplaceFrom : Java.Lang.ICharSequence * Java.Lang.ICharSequence -> string
Parameters
- sequence
- ICharSequence
charsequence to replace matching spans in.
- replacement
- ICharSequence
replacement sequence. To delete, use ""
Returns
modified string.
- Attributes
Remarks
Replace all matching spans in sequence by the replacement, counting by CountMethod.MIN_ELEMENTS using SpanCondition.SIMPLE. The code alternates spans; see the class doc for UnicodeSetSpanner for a note about boundary conditions.
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
ReplaceFrom(String, String)
Replace all matching spans in sequence by the replacement, counting by CountMethod.
public string? ReplaceFrom(string? sequence, string? replacement);
member this.ReplaceFrom : string * string -> string
Parameters
- sequence
- String
charsequence to replace matching spans in.
- replacement
- String
replacement sequence. To delete, use ""
Returns
modified string.
Remarks
Replace all matching spans in sequence by the replacement, counting by CountMethod.MIN_ELEMENTS using SpanCondition.SIMPLE. The code alternates spans; see the class doc for UnicodeSetSpanner for a note about boundary conditions.
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
ReplaceFrom(ICharSequence, ICharSequence, UnicodeSetSpanner+CountMethod)
Replace all matching spans in sequence by replacement, according to the CountMethod, using SpanCondition.SIMPLE.
[Android.Runtime.Register("replaceFrom", "(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/icu/text/UnicodeSetSpanner$CountMethod;)Ljava/lang/String;", "GetReplaceFrom_Ljava_lang_CharSequence_Ljava_lang_CharSequence_Landroid_icu_text_UnicodeSetSpanner_CountMethod_Handler", ApiSince=24)]
public virtual string? ReplaceFrom(Java.Lang.ICharSequence? sequence, Java.Lang.ICharSequence? replacement, Android.Icu.Text.UnicodeSetSpanner.CountMethod? countMethod);
[<Android.Runtime.Register("replaceFrom", "(Ljava/lang/CharSequence;Ljava/lang/CharSequence;Landroid/icu/text/UnicodeSetSpanner$CountMethod;)Ljava/lang/String;", "GetReplaceFrom_Ljava_lang_CharSequence_Ljava_lang_CharSequence_Landroid_icu_text_UnicodeSetSpanner_CountMethod_Handler", ApiSince=24)>]
abstract member ReplaceFrom : Java.Lang.ICharSequence * Java.Lang.ICharSequence * Android.Icu.Text.UnicodeSetSpanner.CountMethod -> string
override this.ReplaceFrom : Java.Lang.ICharSequence * Java.Lang.ICharSequence * Android.Icu.Text.UnicodeSetSpanner.CountMethod -> string
Parameters
- sequence
- ICharSequence
charsequence to replace matching spans in.
- replacement
- ICharSequence
replacement sequence. To delete, use ""
- countMethod
- UnicodeSetSpanner.CountMethod
whether to treat an entire span as a match, or individual elements as matches
Returns
modified string.
- Attributes
Remarks
Replace all matching spans in sequence by replacement, according to the CountMethod, using SpanCondition.SIMPLE. The code alternates spans; see the class doc for UnicodeSetSpanner for a note about boundary conditions.
Android reference for android.icu.text.UnicodeSetSpanner.replaceFrom.
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.