UnicodeSetSpanner.Trim 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 |
|---|---|
| Trim(String) |
Returns a trimmed sequence (using CharSequence. |
| Trim(String, UnicodeSetSpanner+TrimOption) |
Trims selected ends of the text using simple spanning. |
| Trim(String, UnicodeSetSpanner+TrimOption, UnicodeSet+SpanCondition) |
Trims selected ends of the text using the supplied spanning condition. |
Trim(String)
Returns a trimmed sequence (using CharSequence.
public string? Trim(string? sequence);
member this.Trim : string -> string
Parameters
- sequence
- String
the sequence to trim
Returns
a subsequence
Remarks
Returns a trimmed sequence (using CharSequence.subSequence()), that omits matching elements at the start and end of the string, using TrimOption.BOTH and SpanCondition.SIMPLE. For example:
{@code
new UnicodeSet("[ab]").trim("abacatbab")}
... returns "cat".
Java documentation for android.icu.text.UnicodeSetSpanner.trim(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
Trim(String, UnicodeSetSpanner+TrimOption)
Trims selected ends of the text using simple spanning.
public string? Trim(string? sequence, Android.Icu.Text.UnicodeSetSpanner.TrimOption? trimOption);
member this.Trim : string * Android.Icu.Text.UnicodeSetSpanner.TrimOption -> string
Parameters
- sequence
- String
The managed string whose ends are examined for trimming.
- trimOption
- UnicodeSetSpanner.TrimOption
Selects leading spans, trailing spans, or both.
Returns
The remaining text converted to a managed string.
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
Trim(String, UnicodeSetSpanner+TrimOption, UnicodeSet+SpanCondition)
Trims selected ends of the text using the supplied spanning condition.
public string? Trim(string? sequence, Android.Icu.Text.UnicodeSetSpanner.TrimOption? trimOption, Android.Icu.Text.UnicodeSet.SpanCondition? spanCondition);
member this.Trim : string * Android.Icu.Text.UnicodeSetSpanner.TrimOption * Android.Icu.Text.UnicodeSet.SpanCondition -> string
Parameters
- sequence
- String
The managed string whose ends are examined for trimming.
- trimOption
- UnicodeSetSpanner.TrimOption
Selects leading spans, trailing spans, or both.
- spanCondition
- UnicodeSet.SpanCondition
Selects the contained or noncontained spans to trim.
Returns
The remaining text converted to a managed string.
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.