docs.unity3d.com
    目次を表示する/隠す

    Class IsMatchFormatter

    Formatter with evaluation of regular expressions.

    Inheritance
    Object
    FormatterBase
    IsMatchFormatter
    Inherited Members
    FormatterBase.Names
    Namespace: UnityEngine.Localization.SmartFormat.Extensions
    Syntax
    [Serializable]
    public class IsMatchFormatter : FormatterBase, IFormatter, ISerializationCallbackReceiver, IFormatterLiteralExtractor
    Remarks

    Syntax: {value:ismatch(regex): format | default} Or in context of a list: {myList:list:{:ismatch(^regex$):{:format}|'no match'}|, | and }

    Constructors

    IsMatchFormatter()

    Creates a new instance of the formatter.

    Declaration
    public IsMatchFormatter()

    Properties

    DefaultNames

    Default names to use when Names is null.

    Declaration
    public override string[] DefaultNames { get; }
    Property Value
    Type Description
    String[]
    Overrides
    FormatterBase.DefaultNames

    RegexOptions

    The options that are provided when evaluating the expression.

    Declaration
    public RegexOptions RegexOptions { get; set; }
    Property Value
    Type Description
    RegexOptions

    Methods

    TryEvaluateFormat(IFormattingInfo)

    Writes the current value to the output, using the specified format. IF this extension cannot write the value, returns false, otherwise true.

    Declaration
    public override bool TryEvaluateFormat(IFormattingInfo formattingInfo)
    Parameters
    Type Name Description
    IFormattingInfo formattingInfo
    Returns
    Type Description
    Boolean
    Overrides
    FormatterBase.TryEvaluateFormat(IFormattingInfo)

    WriteAllLiterals(IFormattingInfo)

    Ignores the format arguments and writes every possible literal value. This is used to extract all possible values so that we can determine the distinct characters for font generation etc.

    Declaration
    public void WriteAllLiterals(IFormattingInfo formattingInfo)
    Parameters
    Type Name Description
    IFormattingInfo formattingInfo
    Implements
    IFormatterLiteralExtractor.WriteAllLiterals(IFormattingInfo)
    トップに戻る
    Copyright © 2023 Unity Technologies — 商標と利用規約
    • 法律関連
    • プライバシーポリシー
    • クッキー
    • 私の個人情報を販売または共有しない
    • Your Privacy Choices (Cookie Settings)