IEditable.Replace 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
多載
| 名稱 | Description |
|---|---|
| Replace(Int32, Int32, ICharSequence) |
替換方便性(st, en, text, 0, text. |
| Replace(Int32, Int32, ICharSequence, Int32, Int32) |
將本可編輯檔案中指定的文字範圍 |
Replace(Int32, Int32, ICharSequence)
替換方便性(st, en, text, 0, text.
[Android.Runtime.Register("replace", "(IILjava/lang/CharSequence;)Landroid/text/Editable;", "GetReplace_IILjava_lang_CharSequence_Handler:Android.Text.IEditableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Android.Text.IEditable? Replace(int st, int en, Java.Lang.ICharSequence? text);
[<Android.Runtime.Register("replace", "(IILjava/lang/CharSequence;)Landroid/text/Editable;", "GetReplace_IILjava_lang_CharSequence_Handler:Android.Text.IEditableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Replace : int * int * Java.Lang.ICharSequence -> Android.Text.IEditable
參數
- st
- Int32
- en
- Int32
- text
- ICharSequence
傳回
- 屬性
備註
替換的便利性(st, en, text, 0, text.length())
的 android.text.Editable.replace(int, int, java.lang.CharSequence)Java 檔。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。
另請參閱
- <xref:Android.Text.IEditable.Replace(System.Int32%2c+System.Int32%2c+System.Int32%2c+System.Int32%2c+System.Int32)>
適用於
Replace(Int32, Int32, ICharSequence, Int32, Int32)
將本可編輯檔案中指定的文字範圍st…en()替換為來自 的切片start…endsource副本。
[Android.Runtime.Register("replace", "(IILjava/lang/CharSequence;II)Landroid/text/Editable;", "GetReplace_IILjava_lang_CharSequence_IIHandler:Android.Text.IEditableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")]
public Android.Text.IEditable? Replace(int st, int en, Java.Lang.ICharSequence? source, int start, int end);
[<Android.Runtime.Register("replace", "(IILjava/lang/CharSequence;II)Landroid/text/Editable;", "GetReplace_IILjava_lang_CharSequence_IIHandler:Android.Text.IEditableInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null")>]
abstract member Replace : int * int * Java.Lang.ICharSequence * int * int -> Android.Text.IEditable
參數
- st
- Int32
- en
- Int32
- source
- ICharSequence
- start
- Int32
- end
- Int32
傳回
這是對這個物件的致敬。
- 屬性
備註
將本可編輯檔案中指定的文字範圍st…en()替換為來自 的切片start…endsource副本。 目的切片可能是空的,此時操作為插入;或來源切片為空,則為刪除。
在提交變更前,每個已設定的 #setFilters 過濾器都有機會修改文字內容 source 。
若 source 是 spaneded,則其跨度會被保留到 Editable。 Editable 內現有且完全涵蓋被替換範圍的跨度會保留,但嚴格屬於被替換範圍的跨度則被移除。 若 包含 source 帶有 Spanned#SPAN_PARAGRAPH 標誌的跨度,且不符合段落邊界限制,則不保留。 作為特殊情況,即使整個游標所在範圍被替換,游標位置仍會被保留。
的 android.text.Editable.replace(int, int, java.lang.CharSequence, int, int)Java 檔。
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。