Documentation

Unity Engine


User Manual

Script Reference

Unity Engine


Utf8ToUtf8(byte*, int, byte*, out int, int)

Copies UTF-8 characters from one buffer to another.
Read time 1 minuteLast updated 16 days ago

Definition

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

Utf8ToUtf8(byte*, int, byte*, int, int)

public static ConversionError Utf8ToUtf8(byte* srcBuffer, int srcLength, byte* destBuffer, out int destLength, int destCapacity)

Parameters

srcBuffer

The source buffer.

srcLength

The number of bytes to read from the source.

destBuffer

The destination buffer.

destLength

Outputs the number of bytes written to the destination.

destCapacity

The size in bytes of the destination buffer.

Returns

Type

Description

ConversionErrorConversionError.None if the copy fully completes. Otherwise, returns ConversionError.Overflow.

Remarks

Assumes the source data is valid UTF-8.