docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IUTF8Bytes

    An interface for a sequence of UTF-8 encoded text.

    Namespace: Unity.Collections
    Assembly: Unity.Collections.dll
    Syntax
    public interface IUTF8Bytes

    Properties

    IsEmpty

    Whether this IUTF8Bytes is empty.

    Declaration
    bool IsEmpty { get; }
    Property Value
    Type Description
    bool

    True if this IUTF8Bytes is empty.

    Methods

    GetUnsafePtr()

    Returns a pointer to the content of this IUTF8Bytes.

    Declaration
    byte* GetUnsafePtr()
    Returns
    Type Description
    byte*

    A pointer to the content of this IUTF8Bytes.

    Remarks

    The pointer may point to stack memory.

    TryResize(int, NativeArrayOptions)

    Attempt to set the length in bytes of this IUTF8Bytes's content buffer.

    Declaration
    bool TryResize(int newLength, NativeArrayOptions clearOptions = NativeArrayOptions.ClearMemory)
    Parameters
    Type Name Description
    int newLength

    The new length in bytes of the IUTF8Bytes's content buffer.

    NativeArrayOptions clearOptions

    Whether any bytes added should be zeroed out.

    Returns
    Type Description
    bool

    True if the new length is valid.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)