IFormattedValue.NextPosition(ConstrainedFieldPosition) 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.
Iterates over field positions in the FormattedValue.
[Android.Runtime.Register("nextPosition", "(Landroid/icu/text/ConstrainedFieldPosition;)Z", "GetNextPosition_Landroid_icu_text_ConstrainedFieldPosition_Handler:Android.Icu.Text.IFormattedValueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=31)]
public bool NextPosition (Android.Icu.Text.ConstrainedFieldPosition? cfpos);
[<Android.Runtime.Register("nextPosition", "(Landroid/icu/text/ConstrainedFieldPosition;)Z", "GetNextPosition_Landroid_icu_text_ConstrainedFieldPosition_Handler:Android.Icu.Text.IFormattedValueInvoker, Mono.Android, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null", ApiSince=31)>]
abstract member NextPosition : Android.Icu.Text.ConstrainedFieldPosition -> bool
Parameters
- cfpos
- ConstrainedFieldPosition
The object used for iteration state. This can provide constraints to iterate over
only one specific field; see ConstrainedFieldPosition#constrainField
.
Returns
true if a new occurrence of the field was found; false otherwise.
- Attributes
Remarks
Iterates over field positions in the FormattedValue. This lets you determine the position of specific types of substrings, like a month or a decimal separator.
To loop over all field positions:
ConstrainedFieldPosition cfpos = new ConstrainedFieldPosition();
while (fmtval.nextPosition(cfpos)) {
// handle the field position; get information from cfpos
}
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.