Java.Text.CollationElementIterator.Offset Property
Returns the character offset in the source string corresponding to the next collation element.

Syntax

[get: Android.Runtime.Register("getOffset", "()I", "GetGetOffsetHandler")]
[set: Android.Runtime.Register("setOffset", "(I)V", "GetSetOffset_IHandler")]
public int Offset { get; set; }

Value

Documentation for this section has not yet been entered.

Remarks

Get method documentation [Android Documentation]

Returns the character offset in the source string corresponding to the next collation element. This value could be any of:

  • The index of the first character in the source string that matches the value of 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.
  • If normalization is on, the index of the immediate subsequent character, or composite character with the first character, having a combining class of 0.
  • The length of the source string, if iteration has reached the end.

Set method documentation [Android Documentation]

Points the iterator at the collation element associated with the character in the source string which is found at the supplied offset. After this call completes, an invocation of the CollationElementIterator.Next method will return this collation element. If newOffset corresponds to a character which is part of a sequence that maps to a single collation element then the iterator is adjusted to the start of that sequence. As a result of this, any subsequent call made to getOffset() may not return the same value set by this method. If the decomposition mode is on, and offset is in the middle of a decomposable 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 decomposable range.

Requirements

Namespace: Java.Text
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1