Struct IMECompositionString | Package Manager UI website
docs.unity.cn
    Show / Hide Table of Contents

    Struct IMECompositionString

    A struct representing an string of characters generated by an IME for text input.

    Namespace: UnityEngine.InputSystem.LowLevel
    Syntax
    public struct IMECompositionString : IEnumerable<char>, IEnumerable
    Remarks

    This is the internal representation of character strings in the event stream. It is exposed to user content through the OnIMECompositionChanged(IMECompositionString) method. It can easily be converted to a normal C# string using ToString(), but is exposed as the raw struct to avoid allocating memory by default.

    Constructors

    IMECompositionString(String)

    Declaration
    public IMECompositionString(string characters)
    Parameters
    Type Name Description
    System.String characters

    Properties

    Count

    Declaration
    public int Count { get; }
    Property Value
    Type Description
    System.Int32

    Item[Int32]

    Declaration
    public char this[int index] { get; }
    Parameters
    Type Name Description
    System.Int32 index
    Property Value
    Type Description
    System.Char

    Methods

    GetEnumerator()

    Declaration
    public IEnumerator<char> GetEnumerator()
    Returns
    Type Description
    System.Collections.Generic.IEnumerator<System.Char>

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.ValueType.ToString()
    Back to top Copyright © 2019 Unity Technologies
    Generated by DocFX