AudioAsset
Ease
FastString
FontAsset
NineSlice
PackedSprite
PackedSpriteID
RB
   HardwareSettings
   IRetroBlitGame
RBAsset
Rect2i
ShaderAsset
SoundReference
SpriteGrid
SpriteSheetAsset
TMXMapAsset
   TMXLayer
   TMXLayerLoadState
   TMXObject
   TMXObjectGroup
   TMXProperties
Vector2i

FastString.FastString

Method

public  FastString(uint maxCapacity)

Parameters

maxCapacity uint Maximum capacity of the string

Returns

Nothing.

Description

Create a new FastString with the maxCapacity specified. The string will never be able to exceed the specified capacity, but its contents can be smaller.

Example

// Allocate a FastString that can hold up to 256 characters
FastString  fstr = new FastString(256);

void Render() {
    fstr.Set("Hello there ").Append(playerName).Append("!");
    RB.Print(new Vector2i(00), Color.white, fstr);
}

See Also

FastString.Append
FastString.Clear

See Docs

Features - Avoid GC with Fast String