Dela via


ITextRange.GetCharacterUtf32(UInt32, Int32) Method

Definition

Retrieves the Unicode Transformation Format (UTF)-32 character code of the character at the specified offset from the end of the text range.

public:
 void GetCharacterUtf32([Out] unsigned int & value, int offset);
void GetCharacterUtf32([Out] uint32_t & value, int const& offset);
public void GetCharacterUtf32(out uint value, int offset);
Public Sub GetCharacterUtf32 (ByRef value As UInteger, offset As Integer)

Parameters

value
UInt32

unsigned int

uint32_t

The character value.

offset
Int32

int

The offset from the end of the text range.

If *offset* isThe method returns this character
0The character at the end of the range
in the middle of a surrogate pairThe corresponding UTF-32 character

Remarks

This method differs from ITextRange.Character in the following ways:

  • It returns the Unicode Transformation Format (UTF)-32 character code for a Unicode Transformation Format (UTF)-16 surrogate pair instead of the pair’s lead code (see Sections 3.8 and 3.9 and Table 3-5 in The Unicode Standard for explanations of this notation).
  • It gets the code for the character at the specified offset from the end of the text range instead of the character at the start of the range.

If you try to retrieve a character that is before the start of the story or at the end of the story, value is set to the character code 0.

If offset is 0, this method retrieves the character at the end of the range.

If offset is in the middle of a surrogate pair, this method retrieves the corresponding Unicode Transformation Format (UTF)-32 character.

Applies to

See also