Interface IFormattingInfo
Contains all necessary info for formatting a value
Namespace: UnityEngine .Localization.SmartFormat .Core.Extensions
Assembly: Unity.Localization.dll
Syntax
public interface IFormattingInfo
Examples
In "{Items.Length:choose(1,2,3):one|two|three}",
the Current
Properties
Name | Description |
---|---|
Alignment | Alignment inserts spaces into the output to ensure consistent length. Positive numbers insert spaces to the left, to right-align the text. Negative numbers insert spaces to the right, to left-align the text. This should only work with the Default Formatter, but is optional with custom formatters. This is primarily for compatibility with String.Format. |
Current |
The current value that is to be formatted. |
Format | This format specifies how to output the Current |
Format |
Infrequently used details, often used for debugging |
Formatter |
When a named formatter is used, this will hold the options. For example, in "{0:choose(1,2,3):one|two|three}", FormatterOptions is "1,2,3". |
Placeholder | Contains all the details about the current placeholder. |
Methods
Name | Description |
---|---|
Formatting |
Creates a Formatting |
Write(string) | Writes a string to the output. |
Write(string, int, int) | Writes a substring to the output. |
Write(Format, object) | Writes the nested format to the output. |