A string is a piece of text, a sequence of characters. Strings are specified by using single or double quotes:
"one string" 'another one'
Double-quoted strings allow using the "\" to insert special characters, single-quoted strings do not.
- \n inserts a newline character
- \" inserts a double-quote
- \\ inserts a backslash
In PCC 1.x, strings are limited to 255 characters. PCC2 has no such limit.
In PCC2 since 1.1.12, strings store Unicode characters. In previous versions, strings hold the extended ASCII set used as the game character set. For external data, this restriction still holds; characters not in the game character set are removed because they cannot be stored.
Commands and Functions taking Str as Parameter
- Abort
- AddCommand
- AddConfig
- AddFCode
- AddItem
- AddNotify
- Asc
- Atom
- AuthPlayer
- Bind
- BuildBaseDefense
- BuildBeams
- BuildDefense
- BuildEngines
- BuildFactories
- BuildHulls
- BuildLaunchers
- BuildMines
- CargoUnload
- CargoUpload
- CargoUploadWait
- CExtract
- Cfg
- Chart.SetView
- CRemove
- Eval
- First
- Format
- GetDirectoryName
- GetFileName
- GetLockInfo
- Input
- InStr
- IsSpecialFCode
- Key
- Left
- Len
- Load
- LoadResource
- Lock
- LTrim
- MakeFileName
- MessageBox
- Mid
- Notify
- Open
- Rest
- Right
- RLink
- RStyle
- RTrim
- RXml
- SelectionLoad
- SelectionSave
- SellSupplies
- SetComment
- SetComment (Drawing Command)
- SetComment (Planet Command)
- SetComment (Ship Command)
- SetFCode
- SetFleetName
- SetName
- String
- String$
- System.Plugin
- Translate
- Trim
- TryLoad
- UI.FileWindow
- UI.Help
- UI.Input
- UI.InputFCode
- UI.InputNumber
- UI.ListFleets
- UI.ListShipPrediction
- UI.ListShips
- UI.Message
- UI.OverlayMessage
- UI.Search
- Val
- Write
Functions returning Str
- AtomStr
- Chr
- Chr$
- First
- Format
- GetDirectoryName
- GetFileName
- GetStr
- InStr
- Left
- LTrim
- MakeFileName
- Mid
- PlanetName
- RandomFCode
- Rest
- Right
- RString
- RTrim
- ShipName
- ShipNameAndId
- Str
- String
- String$
- Translate
- Trim
Properties of type Str
- Algorithm
- Aux
- Aux.Short
- Base
- Beam
- Beam.Short
- Build
- Build.Short
- Colonists.Change
- Colonists.Happy
- Comment
- Description
- Directory
- Enemy
- Enemy.Adj
- Engine
- FCode
- Fleet
- Fleet.Name
- Fleet.Status
- FullText
- Group
- Heading
- Hull
- Hull$
- Hull.Short
- Hull.Special
- Id
- Industry
- Info1
- Info2
- Key
- Left.Aux
- Left.Aux.Short
- Left.Beam
- Left.Beam.Short
- Left.Hull
- Left.Owner
- Left.Owner.Adj
- Left.Status
- Left.Torp
- Left.Torp.Short
- Left.Type
- Left.Type.Short
- Loc
- Mission
- Mission.Short
- My.Race
- My.Race.Adj
- My.Race.Full
- Name
- Name.Short
- Natives.Change
- Natives.Gov
- Natives.Happy
- Natives.Race
- Orbit
- Owner
- Owner.Adj
- Race
- Race.Adj
- Race.Short
- Right.Aux
- Right.Aux.Short
- Right.Beam
- Right.Beam.Short
- Right.Hull
- Right.Owner
- Right.Owner.Adj
- Right.Status
- Right.Torp
- Right.Torp.Short
- Right.Type
- Right.Type.Short
- Shipyard
- Shipyard.Action
- Shipyard.Name
- Special
- Speed
- Status
- System.Err
- System.GameDirectory
- System.GameType
- System.Host
- System.Language
- System.Local
- System.Program
- System.RegStr1
- System.RegStr2
- System.Remote
- System.RootDirectory
- System.Version
- Text
- Torp
- Torp.Short
- Transfer.Ship.Name
- Turn.Date
- Turn.Time
- Type
- Type.Short
- Type.Short (Planet Property)
- Type.Short (Ship Property)
- Type.Short (Combat Participant Property)
- UI.Directory
- UI.Result
- Waypoint