Interface IUTF8Bytes | Collections | 0.15.0-preview.21
docs.unity3d.com
    Show / Hide Table of Contents

    Interface IUTF8Bytes

    Interface marking this type as a run of UTF-8 encoded text.

    Namespace: Unity.Collections
    Syntax
    public interface IUTF8Bytes

    Properties

    IsEmpty

    Returns true if this IUTF8Bytes is empty.

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

    Methods

    GetUnsafePtr()

    Returns an unsafe byte pointer to the bytes in this IUTF8Bytes. Special care must be taken with the lifettime of this pointer, as it may point to stack memory.

    Declaration
    byte *GetUnsafePtr()
    Returns
    Type Description
    Byte*

    TryResize(Int32, NativeArrayOptions)

    Attempt to set the size of the underlying buffer.

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

    The new length of the string

    NativeArrayOptions clearOptions

    Whether the new memory should be initialized or not.

    Returns
    Type Description
    Boolean

    Whether the resize was successful.

    Back to top
    Copyright © 2023 Unity Technologies — Terms of use
    • Legal
    • Privacy Policy
    • Cookies
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)
    "Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
    Generated by DocFX on 18 October 2023