docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method GetUTF8LiteralPointer

    GetUTF8LiteralPointer(string, out int)

    Return a pointer to read-only memory consisting of the literal UTF-8 bytes of a string constant.

    Declaration
    public static byte* GetUTF8LiteralPointer(string str, out int byteCount)
    Parameters
    Type Name Description
    string str

    A string which must a string literal

    int byteCount

    Receives the number of UTF-8 encoded bytes the constant contains (excluding null terminator)

    Returns
    Type Description
    byte*

    A pointer to constant data representing the UTF-8 encoded bytes of the string literal, terminated with a null terminator

    In This Article
    Back to top
    Copyright © 2025 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)