文档

Unity Engine

Unity Engine

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

Copies UTF-8 characters from one buffer to another.
阅读时间1 分钟最后更新于 1 个月前

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.