CollationElementIterator.Offset Property
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.
Returns the character offset in the source string corresponding to the next collation element. -or- Sets the iterator to point to the collation element corresponding to the character at the specified offset.
public int Offset { [Android.Runtime.Register("getOffset", "()I", "", ApiSince=24)] get; [Android.Runtime.Register("setOffset", "(I)V", "", ApiSince=24)] set; }
[<get: Android.Runtime.Register("getOffset", "()I", "", ApiSince=24)>]
[<set: Android.Runtime.Register("setOffset", "(I)V", "", ApiSince=24)>]
member this.Offset : int with get, set
Property Value
The character offset in the source string corresponding to the collation element that will be returned by the next call to next() or previous().
- Attributes
Remarks
Property getter documentation:
Returns the character offset in the source string corresponding to the next collation element. I.e., getOffset() returns the position in the source string corresponding to the collation element that will be returned by the next call to next() or previous(). This value could be any of: <ul> <li> The index of the <b>first</b> character corresponding to the next collation element. (This means that if setOffset(offset)
sets the index in the middle of a contraction, getOffset()
returns the index of the first character in the contraction, which may not be equal to the original offset that was set. Hence calling getOffset() immediately after setOffset(offset) does not guarantee that the original offset set will be returned.) <li> If normalization is on, the index of the <b>immediate</b> subsequent character, or composite character with the first character, having a combining class of 0. <li> The length of the source string, if iteration has reached the end. </ul>
Java documentation for android.icu.text.CollationElementIterator.getOffset()
.
Property setter documentation:
Sets the iterator to point to the collation element corresponding to the character at the specified offset. The value returned by the next call to next() will be the collation element corresponding to the characters at offset.
If offset is in the middle of a contracting character sequence, the iterator is adjusted to the start of the contracting sequence. This means that getOffset() is not guaranteed to return the same value set by this method.
If the decomposition mode is on, and offset is in the middle of a decomposible range of source text, the iterator may not return a correct result for the next forwards or backwards iteration. The user must ensure that the offset is not in the middle of a decomposible range.
Java documentation for android.icu.text.CollationElementIterator.setOffset(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.