{!See https://docs.google.com/document/d/1takg_GmIBBKKTj-GHZCwzxohpQz7Bhekivkk72kYMtE/edit for reference implementation of OneTrust, dataLayer and GTM} {!OneTrust Cookies Consent} {!OneTrust Cookies Consent end} {!dataLayer initialization push} {!dataLayer initialization push end} {!Google Tag Manager} {!Google Tag Manager end} Method CopyFromTruncated | Collections | 2.3.0-pre.3
docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Method CopyFromTruncated

    CopyFromTruncated<T>(ref T, string)

    Copies another string to this string. If the string exceeds the capacity it will be truncated. Replaces any existing content of the FixedString.

    Declaration
    [ExcludeFromBurstCompatTesting("Takes managed string")]
    public static CopyError CopyFromTruncated<T>(this ref T fs, string s) where T : unmanaged, INativeList<byte>, IUTF8Bytes
    Parameters
    Type Name Description
    T fs

    The destination string.

    string s

    The source string.

    Returns
    Type Description
    CopyError

    CopyError.None if successful. Returns CopyError.Truncation if the source string is too large to fit in the destination.

    Type Parameters
    Name Description
    T

    The type of the destination string.

    CopyFromTruncated<T, T2>(ref T, in T2)

    Copies another string to this string. If the string exceeds the capacity it will be truncated.

    Declaration
    public static CopyError CopyFromTruncated<T, T2>(this ref T fs, in T2 input) where T : unmanaged, INativeList<byte>, IUTF8Bytes where T2 : unmanaged, INativeList<byte>, IUTF8Bytes
    Parameters
    Type Name Description
    T fs

    The destination string.

    T2 input

    The source string.

    Returns
    Type Description
    CopyError

    CopyError.None if successful. Returns CopyError.Truncation if the source string is too large to fit in the destination.

    Type Parameters
    Name Description
    T

    The type of the destination string.

    T2

    The type of the source string.

    Remarks

    When the method returns an error, the destination string is not modified.

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