docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Struct IMECompositionString

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

    Implements
    IEnumerable<char>
    IEnumerable
    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    Namespace: UnityEngine.InputSystem.LowLevel
    Assembly: Unity.InputSystem.dll
    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
    string characters

    Properties

    Count

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

    this[int]

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

    Methods

    GetEnumerator()

    Declaration
    public IEnumerator<char> GetEnumerator()
    Returns
    Type Description
    IEnumerator<char>

    ToString()

    Declaration
    public override string ToString()
    Returns
    Type Description
    string
    Overrides
    ValueType.ToString()

    Implements

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