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

FastString.PadRight

Method

public FastString PadRight(int count, char paddingChar = ' ')

Parameters

count int Amount of characters to pad with
paddingChar char Character to pad with

Returns

FastString

The same instance of FastString

Description

Pad string with paddingChar on the right side.

Example

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

void Update() {
    fstr.Set("500");
    Debug.Log(fstr.PadRight(4)); // fstr == "500    "

    fstr.Set("500");
    Debug.Log(fstr.PadRight(4'.')); // fstr == "500...."
}