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

FastString.Substring

Method

public FastString Substring(int startIndex)
public FastString Substring(int startIndex, int length)

Parameters

startIndex int Start of the substring
length int Length of the substring

Returns

FastString

The same instance of FastString

Description

Set to a substring of the original string. If length is not specified then the substring contains all characters from the index to the end of the original string.

Example

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

void Update() {
    fstr.Set("RetroBlit is pretty neat!");
    Debug.Log(fstr.Substring(13)); // fstr == "pretty neat!"

    fstr.Set("RetroBlit is pretty neat!");
    Debug.Log(fstr.Substring(136)); // fstr == "pretty"
}

See Also

FastString.Remove
FastString.Replace