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

FastString.Remove

Method

public FastString Remove(int startIndex)
public FastString Remove(int startIndex, int count)

Parameters

startIndex int Index to start removing from
count int Amount of characters to delete

Returns

FastString

The same instance of FastString

Description

Remove a section of the string. If count is not specified then deletes all characters from startIndex to the end of the string.

Example

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

void Update() {
    fstr.Set("You can't delete me!");
    Debug.Log(fstr.Remove(3)); // fstr == "You"

    fstr.Set("You can't delete me!");
    Debug.Log(fstr.Remove(36)); // fstr == "You delete me!"
}

See Also

FastString.Replace