docs.unity.cn
    Show / Hide Table of Contents

    Struct Unicode.Rune

    Namespace: Unity.Collections
    Syntax
    public struct Rune

    Constructors

    Rune(Int32)

    Construct a rune for the given unicode code point. No validation is done to check whether the code point is valid.

    Declaration
    public Rune(int codepoint)
    Parameters
    Type Name Description
    Int32 codepoint

    The codepoint

    Fields

    value

    Declaration
    public int value
    Field Value
    Type Description
    Int32

    Methods

    IsDigit(Unicode.Rune)

    Declaration
    public static bool IsDigit(Unicode.Rune c)
    Parameters
    Type Name Description
    Unicode.Rune c
    Returns
    Type Description
    Boolean

    LengthInUtf8Bytes()

    Returns the number of UTF-8 bytes required to encode this Rune. If the Rune's codepoint value is invalid, returns 4 (maximum possible encoding length).

    Declaration
    public int LengthInUtf8Bytes()
    Returns
    Type Description
    Int32

    Number of bytes required to encode this Rune as UTF-8.

    Operators

    Explicit(Char to Unicode.Rune)

    Declaration
    public static explicit operator Unicode.Rune(char c)
    Parameters
    Type Name Description
    Char c
    Returns
    Type Description
    Unicode.Rune
    Back to top Copyright © 2020 Unity Technologies
    Generated by DocFX
    on Friday, May 21, 2021