docs.unity3d.com
    Show / Hide Table of Contents

    Class BurstStringWrapper

    Helper functions for Burst compatible string operations.

    Inheritance
    Object
    BurstStringWrapper
    Inherited Members
    Object.ToString()
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.ReferenceEquals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Namespace: Unity.Logging
    Syntax
    public static class BurstStringWrapper

    Methods

    AppendString(ref UnsafeText, String)

    Appends string into UnsafeText. In Burst context Unity.Logging.BurstStringWrapper.AppendString__Unmanaged(Unity.Collections.LowLevel.Unsafe.UnsafeText@,System.Byte*,System.Int32) will be called instead

    Declaration
    public static FormatError AppendString(ref UnsafeText output, string str)
    Parameters
    Type Name Description
    UnsafeText output

    UnsafeText append to

    String str

    String that should be appended

    Returns
    Type Description
    FormatError

    FormatError from Append operation

    IsEmpty(String)

    Checks if the string is empty. In Burst context Unity.Logging.BurstStringWrapper.AppendString__Unmanaged(Unity.Collections.LowLevel.Unsafe.UnsafeText@,System.Byte*,System.Int32) will be called instead

    Declaration
    public static bool IsEmpty(string fieldName)
    Parameters
    Type Name Description
    String fieldName
    Returns
    Type Description
    Boolean

    True if string is null or empty

    IsEmpty__Unmanaged(Byte*, Int32)

    Do not call directly! Use IsEmpty(String) - burst will call this automatically if can

    Declaration
    [RequiredMember]
    public static bool IsEmpty__Unmanaged(byte *utf8Bytes, int utf8Len)
    Parameters
    Type Name Description
    Byte* utf8Bytes

    UTF8 string pointer

    Int32 utf8Len

    UTF8 string length

    Returns
    Type Description
    Boolean

    True if string is null or empty

    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