Share via


UnicodeSet.Retain Method

Definition

Overloads

Retain(Int32, Int32)

Retain only the elements in this set that are contained in the specified range.

Retain(ICharSequence)

Retain the specified string in this set if it is present.

Retain(Int32)

Retain the specified character from this set if it is present.

Retain(String)

Retain the specified string in this set if it is present.

Retain(Int32, Int32)

Retain only the elements in this set that are contained in the specified range.

[Android.Runtime.Register("retain", "(II)Landroid/icu/text/UnicodeSet;", "GetRetain_IIHandler", ApiSince=24)]
public virtual Android.Icu.Text.UnicodeSet? Retain (int start, int end);
[<Android.Runtime.Register("retain", "(II)Landroid/icu/text/UnicodeSet;", "GetRetain_IIHandler", ApiSince=24)>]
abstract member Retain : int * int -> Android.Icu.Text.UnicodeSet
override this.Retain : int * int -> Android.Icu.Text.UnicodeSet

Parameters

start
Int32

first character, inclusive, of range

end
Int32

last character, inclusive, of range

Returns

Attributes

Remarks

Retain only the elements in this set that are contained in the specified range. If start &gt; end then an empty range is retained, leaving the set empty.

Java documentation for android.icu.text.UnicodeSet.retain(int, int).

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

Retain(ICharSequence)

Retain the specified string in this set if it is present.

[Android.Runtime.Register("retain", "(Ljava/lang/CharSequence;)Landroid/icu/text/UnicodeSet;", "", ApiSince=24)]
public Android.Icu.Text.UnicodeSet? Retain (Java.Lang.ICharSequence? cs);
[<Android.Runtime.Register("retain", "(Ljava/lang/CharSequence;)Landroid/icu/text/UnicodeSet;", "", ApiSince=24)>]
member this.Retain : Java.Lang.ICharSequence -> Android.Icu.Text.UnicodeSet

Parameters

cs
ICharSequence

the string to be retained

Returns

this object, for chaining

Attributes

Remarks

Retain the specified string in this set if it is present. Upon return this set will be empty if it did not contain s, or will only contain s if it did contain s.

Java documentation for android.icu.text.UnicodeSet.retain(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

Retain(Int32)

Retain the specified character from this set if it is present.

[Android.Runtime.Register("retain", "(I)Landroid/icu/text/UnicodeSet;", "", ApiSince=24)]
public Android.Icu.Text.UnicodeSet? Retain (int c);
[<Android.Runtime.Register("retain", "(I)Landroid/icu/text/UnicodeSet;", "", ApiSince=24)>]
member this.Retain : int -> Android.Icu.Text.UnicodeSet

Parameters

c
Int32

the character to be retained

Returns

this object, for chaining

Attributes

Remarks

Retain the specified character from this set if it is present. Upon return this set will be empty if it did not contain c, or will only contain c if it did contain c.

Java documentation for android.icu.text.UnicodeSet.retain(int).

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

Retain(String)

Retain the specified string in this set if it is present.

public Android.Icu.Text.UnicodeSet? Retain (string? cs);
member this.Retain : string -> Android.Icu.Text.UnicodeSet

Parameters

cs
String

the string to be retained

Returns

this object, for chaining

Remarks

Retain the specified string in this set if it is present. Upon return this set will be empty if it did not contain s, or will only contain s if it did contain s.

Java documentation for android.icu.text.UnicodeSet.retain(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