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

FastString.Trim

Method

public FastString Trim()

Parameters

No parameters.

Returns

FastString

The same instance of FastString

Description

Trim all leading and trailing spaces from the string.

Example

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

void Update() {
    // Prints "RetroBlit"
    fstr.Set("  RetroBlit  ");
    fstr.Trim();
    RB.Print(new Vector2i(00), Color.white, fstr);
}

See Also

FastString.TrimStart
FastString.TrimEnd