DateIntervalFormat.FormattedDateInterval.NextPosition 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
在 FormattedValue 中反覆計算欄位位置。
[Android.Runtime.Register("nextPosition", "(Landroid/icu/text/ConstrainedFieldPosition;)Z", "", ApiSince=31)]
public bool NextPosition(Android.Icu.Text.ConstrainedFieldPosition? cfpos);
[<Android.Runtime.Register("nextPosition", "(Landroid/icu/text/ConstrainedFieldPosition;)Z", "", ApiSince=31)>]
abstract member NextPosition : Android.Icu.Text.ConstrainedFieldPosition -> bool
override this.NextPosition : Android.Icu.Text.ConstrainedFieldPosition -> bool
參數
- cfpos
- ConstrainedFieldPosition
用於迭代狀態的物件。 這可以提供只遍歷單一特定欄位的限制;請參見 ConstrainedFieldPosition.constrainField。
傳回
若發現該場的新出現,則為真;否則就是錯誤的。
實作
- 屬性
備註
在 FormattedValue 中反覆計算欄位位置。 這讓你能判斷特定子字串的位置,例如月份或十進位分隔符。 要循環檢查所有場地位置:
ConstrainedFieldPosition cfpos = new ConstrainedFieldPosition();
while (fmtval.nextPosition(cfpos)) {
// handle the field position; get information from cfpos
}
Android 參考資料。android.icu.text.DateIntervalFormat.FormattedDateInterval.nextPosition
本頁部分內容為基於 Open Source Project 所創建與分享的作品,並依授權條款所描述的使用進行修改。