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

class Format in Tinman.Core.Formatting

Helper class for string formatting using simple placeholder patterns.

class Format base of Format_1
  Format_N
  Format_StringBuilder

Remarks

A format pattern is a string with embedded placeholders (# or @ characters):

"Some String with # placeholders @ in it."
The placeholders are replaced one after another (from left to right) by calling one of the following methods for each placeholder: Use the ## and @@ tokens in order to insert a plain # resp. @ character in the pattern.

Public / Methods

DecimalDigits

Returns the number of decimal digits necessary for writing the given integer number.

[Pure]
public static method DecimalDigits (int64 number)
type int32
params number The integer number.
returns [>=1] The number of needed decimal digits.

Digits

Specifies the digit count to use for integer values (see Digits ).

[Pure]
public static method Digits (int32 digits)
type FormatFlags
params digits [0..64] The number of digits.
returns The FormatFlags value.

Eight

Formats a pattern with eight placeholders.

[Pure]
public static method Eight (string pattern)
type Format_8
params pattern The pattern.
returns [not-null] The pattern formatter.

Remarks:

Formatting is finished automatically after all placeholder have been specified.

Exponent

Specifies the decimal exponent to use for formatting integer values (see Exponent).

[Pure]
public static method Exponent (int32 decimalExponent)
type FormatFlags
params decimalExponent [-32767..32767] The decimal exponent.
returns The format flags value.

Five

Formats a pattern with five placeholders.

[Pure]
public static method Five (string pattern)
type Format_5
params pattern The pattern.
returns [not-null] The pattern formatter.

Remarks:

Formatting is finished automatically after all placeholder have been specified.

Four

Formats a pattern with four placeholders.

[Pure]
public static method Four (string pattern)
type Format_4
params pattern The pattern.
returns [not-null] The pattern formatter.

Remarks:

Formatting is finished automatically after all placeholder have been specified.

Many

Formats a pattern with any number of placeholders.

[Pure]
public static method Many (string pattern)
type Format_N
params pattern The pattern.
returns [not-null] The pattern formatter.

Remarks:

Calling ToString on the returned object will finish the formatting.

Nine

Formats a pattern with nine placeholders.

[Pure]
public static method Nine (string pattern)
type Format_9
params pattern The pattern.
returns [not-null] The pattern formatter.

Remarks:

Formatting is finished automatically after all placeholder have been specified.

One

Formats a pattern with one placeholder.

[Pure]
public static method One (string pattern)
type Format_1
params pattern The pattern.
returns [not-null] The pattern formatter.

Remarks:

Formatting is finished automatically after all placeholder have been specified.

Row

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (string a, object b)
type string
params a The first value.
  b The second value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (object a, string b)
type string
params a The first value.
  b The second value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (object a, object b)
type string
params a The first value.
  b The second value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (string a, char b)
type string
params a The first value.
  b The second value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (char a, string b)
type string
params a The first value.
  b The second value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (string a, string b)
type string
params a The first value.
  b The second value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (object a, object b, object c)
type string
params a The first value.
  b The second value.
  c The third value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (string a, object b, object c)
type string
params a The first value.
  b The second value.
  c The third value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (object a, string b, object c)
type string
params a The first value.
  b The second value.
  c The third value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (object a, object b, string c)
type string
params a The first value.
  b The second value.
  c The third value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (object a, string b, string c)
type string
params a The first value.
  b The second value.
  c The third value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (string a, object b, string c)
type string
params a The first value.
  b The second value.
  c The third value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (string a, string b, object c)
type string
params a The first value.
  b The second value.
  c The third value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (char a, string b, string c)
type string
params a The first value.
  b The second value.
  c The third value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (string a, char b, string c)
type string
params a The first value.
  b The second value.
  c The third value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (string a, string b, char c)
type string
params a The first value.
  b The second value.
  c The third value.
returns [not-null] The formatted value.

Formats the given values in a row, one after another (simple concatenation).

[Pure]
public static method Row (string a, string b, string c)
type string
params a The first value.
  b The second value.
  c The third value.
returns [not-null] The formatted value.

Seven

Formats a pattern with seven placeholders.

[Pure]
public static method Seven (string pattern)
type Format_7
params pattern The pattern.
returns [not-null] The pattern formatter.

Remarks:

Formatting is finished automatically after all placeholder have been specified.

Six

Formats a pattern with six placeholders.

[Pure]
public static method Six (string pattern)
type Format_6
params pattern The pattern.
returns [not-null] The pattern formatter.

Remarks:

Formatting is finished automatically after all placeholder have been specified.

ThisBool

Formats the given boolean as a string.

[Pure]
public static method ThisBool (bool b, string ifTrue = "true", string ifFalse = "false")
type string
params b The boolean value.
  ifTrue [not-null] The string value to use for true.
  ifFalse [not-null] The string value to use for false.
returns [not-null] The string formatted boolean.

See also:

Parse.Number
Parse.Number

ThisChar

Formats the given character as a string.

[Pure]
public static method ThisChar (char c, int32 repeat = 1)
type string
params c The character value.
  repeat [>=0] Number of times to repeat c.
returns [not-null] The string formatted character.

See also:

Parse.Number
Parse.Number

ThisInt

Formats the given number as a string.

[Pure]
public static method ThisInt (int64 number, FormatFlags flags = FormatFlags.Default)
type string
params number The number value.
  flags The number format flags to use.
returns [not-null] The string formatted number.

See also:

Parse.Integer
Parse.Integer

ThisNum

Formats the given number as a string.

[Pure]
public static method ThisNum (float64 number, FormatFlags flags = FormatFlags.Default)
type string
params number The number value.
  flags The number format flags to use.
returns [not-null] The string formatted number.

See also:

Parse.Number
Parse.Number

ThisObj

Formats the given object reference.

[Pure]
public static method ThisObj (object obj)
type string
params obj The object reference.
returns [not-null] The string formatted object reference.

Three

Formats a pattern with three placeholders.

[Pure]
public static method Three (string pattern)
type Format_3
params pattern The pattern.
returns [not-null] The pattern formatter.

Remarks:

Formatting is finished automatically after all placeholder have been specified.

Two

Formats a pattern with two placeholders.

[Pure]
public static method Two (string pattern)
type Format_2
params pattern The pattern.
returns [not-null] The pattern formatter.

Remarks:

Formatting is finished automatically after all placeholder have been specified.

Protected / Attributes

builder

The internally used string builder object.

protected readonly field builder
type StringBuilder

Protected / Methods

Finish

Finishes formatting.

protected method Finish ()
type string
returns The resulting string.

Remarks:

The string builder will be cleared by this method.

FinishBuilder

Finishes formatting.

protected method FinishBuilder ()

Remarks:

The string builder will contain the resulting string.

Next

Moves to the next placeholder, if existent.

protected method Next ()
type bool
returns true if the placeholder exists, false if there are no more placeholders.