Matcher.Region(Int32, Int32) 方法

定義

設定此比對器區域的限制。

[Android.Runtime.Register("region", "(II)Ljava/util/regex/Matcher;", "")]
public Java.Util.Regex.Matcher Region (int start, int end);
[<Android.Runtime.Register("region", "(II)Ljava/util/regex/Matcher;", "")>]
member this.Region : int * int -> Java.Util.Regex.Matcher

參數

start
Int32

要開始搜尋的索引(含)

end
Int32

要結束搜尋的索引(獨佔)

傳回

此比對器

屬性

備註

設定此比對器區域的限制。 區域是要搜尋以尋找相符專案的輸入序列的一部分。 叫用此方法會重設比對器,然後將區域設定為從 參數指定的 start 索引開始,並在參數所 end 指定的索引結束。

視使用的透明度和錨定而定(請參閱 #useTransparentBounds(boolean) useTransparentBounds#useAnchoringBounds(boolean) useAnchoringBounds),某些建構,例如錨點在區域界限或周圍的行為可能會有所不同。

已在1.5中新增。

java.util.regex.Matcher.region(int, int)Java 檔。

此頁面的部分是根據 Android 開放原始碼專案所建立和共用的工作進行修改,並根據 Creative Commons 2.5 屬性授權中所述的詞彙使用。

適用於