TINMAN 3D / REALTIME TERRAIN
Software Development Kit - User Manual

class Label in Tinman.Core.Formatting

A label string with format value tags.

[ShutdownSurvive]
sealed class Label  

Remarks

The Grammar of a label is as follows:

label         := (text | tag)* ;

!tag          := '{' '0'..'9'+ expr? '}' ;
text          := text-char+ ;

!expr         := expr-choice | expr-plural | expr-singular ;
text-char     := '{{' | ]{[ ;

expr-choice   := '>' argument ('|' argument)* ;
expr-plural   := '?' argument ('|' argument)? ;
expr-singular := '!' argument ('|' argument)? ;

!argument     := (char+ | '#')* ;

char          := ]}#\\|[ | '\\' [}#\\|] ;
Here are some examples: The following escape sequences are available: For evaluation, tag values are interpreted as integer values according to these rules:

Public / Attributes

Format

Formats this label with custom tag values.

public property Format { get }
type LabelFormat
value The label formatter.

Public / Constants

Any

A label that consists of a single placeholder: {0}.

public static readonly field Any
type Label

Public / Methods

From

Parses a label.

public static method From (string source)
type Label
params source [not-null] The label source code.
returns [not-null] The parsed label.

Exceptions:

ToString

public override method ToString ()
type string