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

class StringBuilder in Tinman.Core.Formatting

Helper class for building (possibly large) string values.

sealed class StringBuilder implements IBuilder<string>
  IInternalBuffer<char[]>

Public / Attributes

InternalBuffer

Returns the internal data buffer of this object.

public property InternalBuffer { get }
type char[]
value [not-null] The internal buffer.
implements IInternalBuffer.InternalBuffer

Remarks:

In most cases, client code will never use the internal buffer of an object. However, under some circumstances it can be advantageous to access the internal buffer directly (e.g. in order to avoid copy operations, reduce amount of produced garbage). Messing with the internal buffer of an object will result in undefined behaviour. So anyone using the internal buffer must know exactly what he or she is doing.

Length

Returns the current string length.

public property Length { get }
type int32
value [>=0] The current string length.

Public / Constructors

StringBuilder

Creates a new instance of StringBuilder.

public constructor StringBuilder (int32 initialCapacity = 32)
params initialCapacity [>=0] The initial character buffer capacity. Defaults to 32.

Public / Methods

Append

Appends the given characters.

public method Append (char[] characters)
type StringBuilder
params characters [not-null] The character array.
returns [not-null] this

Appends the given string.

public method Append (string str)
type StringBuilder
params str The string to append.
returns [not-null] this

Appends the given string.

public method Append (StringBuilder builder)
type StringBuilder
params builder [not-null] The string to append.
returns [not-null] this

Appends the string representation of the given boolean value.

public method Append (bool value)
type StringBuilder
params value The object value.
returns [not-null] this

Appends the string representation of the given object value.

public method Append (object value)
type StringBuilder
params value The object value.
returns [not-null] this

Appends the given character count times.

public method Append (char character, int32 count = 1)
type StringBuilder
params character The character to append.
  count [>=0] Number of times to append character. Defaults to 1.
returns [not-null] this

Appends the string representation of the given integer number.

public method Append (int64 number, FormatFlags flags = FormatFlags.Default)
type StringBuilder
params number The integer number.
  flags The number format flags to use.
returns [not-null] this

Appends the string representation of the given decimal number.

public method Append (float64 number, FormatFlags flags = FormatFlags.Default)
type StringBuilder
params number The decimal number.
  flags The number format flags to use.
returns [not-null] this

Appends the given characters.

public method Append ([] char[] characters, int32 offset, int32 count)
type StringBuilder
params characters [not-null] The character array.
  offset [>=0] Index of first character in characters to append.
  count [>=0] Total number of characters to append.
returns [not-null] this

Appends the given string.

public method Append (string str, int32 offset, int32 count)
type StringBuilder
params str The string to append.
  offset [>=0] Index of first character in str to append.
  count [>=0] Total number of characters to append.
returns [not-null] this

Build

Finishes the build process and returns the resulting object.

[OwnerReturn, OwnerThis]
public method Build ()
type string
returns The resulting object.
implements IBuilder.Build

Clear

Clears the content of this StringBuilder.

public method Clear ()
type StringBuilder
returns [not-null] this

Newline

public method Newline (int32 n = 1)
type StringBuilder
params n

Pattern

public method Pattern (string pattern)
type Format_StringBuilder
params pattern

Remove

Removes a portion of the current string data.

public method Remove (int32 offset, int32 length)
params offset [0..Length] Offset to first character to remove.
  length [0..Length-offset] Number of characters to remove.

ToString

[Pure]
public override method ToString ()
type string