Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Utf16ToUcs(out Rune, char*, ref int, int)

Reads a UTF-16 encoded character from a buffer.
Read time 1 minuteLast updated 13 days ago

Definition

  • Type: Method
  • Namespace: Unity.Collections
  • Assembly: UnityEngine.ManagedKernelModule

Utf16ToUcs(Rune, char*, int, int)

public static ConversionError Utf16ToUcs(out Unicode.Rune rune, char* buffer, ref int index, int capacity)

Parameters

rune

Outputs the character read. If the read fails, rune is not set.

buffer

The buffer of chars to read.

index

Reference to a char index into the buffer. If the read succeeds, index is incremented by the size in chars of the character read. If the read fails, index is not incremented.

capacity

The size in chars of the buffer. Used to check that the read is in bounds.

Returns

Type

Description

ConversionErrorConversionError.None if the read succeeds. Otherwise, returns ConversionError.Overflow.