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.99.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
- AddObjects
- AddObjectsAt
- Asc
- Atom
- Bind
- BuildBaseDefense
- BuildBeams
- BuildDefense
- BuildEngines
- BuildFactories
- BuildHulls
- BuildLaunchers
- BuildMines
- CargoUnload
- CargoUpload
- CExtract
- Cfg
- CRemove
- Eval
- First
- Format
- InStr
- IsSpecialFCode
- Key
- LCase
- Left
- Len
- Load
- LTrim
- Mid
- Reference
- Rest
- Right
- RTrim
- SellSupplies
- SetComment
- SetComment (Ship Command)
- SetComment (Planet Command)
- SetFCode
- SetName
- String
- String$
- Translate
- Trim
- TryLoad
- UCase
- Val
Functions returning Str
- AtomStr
- Chr
- Chr$
- First
- Format
- InStr
- LCase
- Left
- LTrim
- Mid
- Quote
- RandomFCode
- Rest
- Right
- RTrim
- Str
- String
- String$
- Translate
- Trim
- UCase
Properties of type Str
- Aux
- Aux.Short
- Base
- Beam
- Beam.Short
- Build
- Build.Short
- Colonists.Change
- Colonists.Happy
- Comment
- Enemy
- Enemy.Adj
- Engine
- FCode
- Heading
- Hull
- Hull$
- Hull.Short
- Hull.Special
- Id
- Industry
- Key
- Kind
- Loc
- Mission
- My.Race
- My.Race.Adj
- My.Race.Full
- Name
- Name$
- Name.Full
- Name.Short
- Natives.Change
- Natives.Gov
- Natives.Happy
- Natives.Race
- Orbit
- Owner
- Owner.Adj
- Race
- Race.Adj
- Race.Short
- Shipyard
- Shipyard.Action
- Shipyard.Name
- Special
- Speed
- System.Err
- System.GameType
- System.Host
- System.Language
- System.Local
- System.Program
- System.RegStr1
- System.RegStr2
- System.Remote
- System.Version
- Torp
- Torp.Short
- Transfer.Ship.Name
- Turn.Date
- Turn.Time
- Type
- Type.Short
- Type.Short (Ship Property)
- Type.Short (Planet Property)
- UI.Directory
- UI.Key
- UI.Result
- Waypoint