IReplaceable.Replace 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
Replace(Int32, Int32, String) |
Replaces a substring of this object with the given text. |
Replace(Int32, Int32, Char[], Int32, Int32) |
Replaces a substring of this object with the given text. |
Replace(Int32, Int32, String)
Replaces a substring of this object with the given text.
[Android.Runtime.Register("replace", "(IILjava/lang/String;)V", "GetReplace_IILjava_lang_String_Handler:Android.Icu.Text.IReplaceableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)]
public void Replace (int start, int limit, string? text);
[<Android.Runtime.Register("replace", "(IILjava/lang/String;)V", "GetReplace_IILjava_lang_String_Handler:Android.Icu.Text.IReplaceableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)>]
abstract member Replace : int * int * string -> unit
Parameters
- start
- Int32
the beginning index, inclusive; 0 <= start
<= limit
.
- limit
- Int32
the ending index, exclusive; start <= limit
<= length()
.
- text
- String
the text to replace characters start
to limit - 1
- Attributes
Remarks
Replaces a substring of this object with the given text.
Subclasses must ensure that if the text between start and limit is equal to the replacement text, that replace has no effect. That is, any metadata should be unaffected. In addition, subclasses are encouraged to check for initial and trailing identical characters, and make a smaller replacement if possible. This will preserve as much metadata as possible.
Java documentation for android.icu.text.Replaceable.replace(int, int, 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
Replace(Int32, Int32, Char[], Int32, Int32)
Replaces a substring of this object with the given text.
[Android.Runtime.Register("replace", "(II[CII)V", "GetReplace_IIarrayCIIHandler:Android.Icu.Text.IReplaceableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)]
public void Replace (int start, int limit, char[]? chars, int charsStart, int charsLen);
[<Android.Runtime.Register("replace", "(II[CII)V", "GetReplace_IIarrayCIIHandler:Android.Icu.Text.IReplaceableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=24)>]
abstract member Replace : int * int * char[] * int * int -> unit
Parameters
- start
- Int32
the beginning index, inclusive; 0 <= start
<= limit
.
- limit
- Int32
the ending index, exclusive; start <= limit
<= length()
.
- chars
- Char[]
the text to replace characters start
to limit - 1
- charsStart
- Int32
the beginning index into chars
,
inclusive; 0 <= start <= limit
.
- charsLen
- Int32
the number of characters of chars
.
- Attributes
Remarks
Replaces a substring of this object with the given text.
Subclasses must ensure that if the text between start and limit is equal to the replacement text, that replace has no effect. That is, any metadata should be unaffected. In addition, subclasses are encouraged to check for initial and trailing identical characters, and make a smaller replacement if possible. This will preserve as much metadata as possible.
Java documentation for android.icu.text.Replaceable.replace(int, int, char[], 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.