Custom Maps & Logic
  • Custom Map Tutorial
    • Custom Map Introduction
    • Your first map
    • Map Navigation
    • Object Selection
    • Object Positioning
    • Object Attributes
    • Shortcuts and Macros
    • Editor Settings
    • Built-in Components Common Errors
    • Map Performance
    • Custom Assets
      • Your first Asset Bundle
      • Asset Bundles in Map Editor
      • Asset Bundles in Game
      • Adding to Asset Bundles
      • Asset Bundle naming
  • Custom Logic Tutorial
    • Custom Logic Introduction
    • Your first script
    • Variables
    • Types
    • Variable Inspector
    • Expressions
    • Conditionals
    • Loops
    • Functions
    • Coroutines
    • Classes
    • Static Classes
    • Components
    • Extensions
    • Cutscenes
    • Static Objects
    • Networking
    • Commenting
  • Reference
    • Static Classes
      • Game
      • Network
      • Map
      • UI
      • Time
      • Convert
      • String
      • Input
      • Math
      • Random
      • Cutscene
      • Camera
      • RoomData
      • PersistentData
      • Json
      • Physics
    • Objects
      • Component
      • Object
      • Character
      • Human
      • Titan
      • Shifter
      • MapObject
      • Transform
      • Player
      • NetworkView
      • Color
      • Vector3
      • Quaternion
      • Dict
      • List
      • Range
      • LineCastHitResult
      • MapTargetable
      • Random
    • Callbacks
      • Main
      • Components
  • Examples
    • Gamemodes
      • Survive
      • Waves
      • Endless
      • Racing
      • Blade PVP
      • Thunderspear PVP
      • Titan Explode
      • Cranked
      • More Examples
    • Components
      • SupplyStation
      • Daylight
      • PointLight
      • Rigidbody
      • NavMeshObstacle
      • Cannon
      • Dummy
      • Wagon
      • Tag
      • KillRegion
      • DamageRegion
      • MovePingPong
      • RacingCheckpointRegion
      • RacingFinishRegion
      • TeleportRegion
      • Animal
      • SignalMover
      • SignalSender
      • More Examples
Powered by GitBook
On this page
  1. Reference
  2. Static Classes

String

String manipulation functions.

Field
Returns
Description

Newline

string

Returns the newline character.

Function
Returns
Description

FormatFloat(num: float, decimals: int)

string

Format the float to decimal places.

FormatFromList(value : string, formatter : list)

string

Equivalent to C# string.format(string, List<string>)

Split(value: string, splitter : string | list<string>, removeEmpty=False)

List(string)

Split the string into a list. Can pass in either a string to split on or a list of strings to split on, the last optional param can remove all empty entries.

Join(value: List, separator: string)

string

Join the list into a string.

Substring(value: string, startIndex: int)

string

Substring of string from startIndex.

SubstringWithLength(value: string, startIndex: int, length: int)

Substring of string from startIndex and with given length.

Length(value: string)

int

Length of the string.

Replace(value: string, match: string, with: string)

string

Replace all matches in the string with the replacement.

Contains(value: string, match: string)

bool

If the string contains match.

IndexOf(value: string, item: string)

int

Returns the index of the given string.

StartsWith(value: string, match: string)

bool

If the string starts with match.

EndsWith(value: string, match: string)

bool

If the string ends with match.

Trim(value: string)

string

Trim all whitespace from start and end of string.

Insert(value: string, insert: string, index: int)

string

Insert a string at given index.

Capitalize(value: string)

string

Capitalizes the first letter of the string.

ToUpper(value: string)

string

Returns string in upper case.

ToLower(value: string)

string

Returns string in lower case.

PreviousConvertNextInput

Last updated 5 months ago