-
Notifications
You must be signed in to change notification settings - Fork 67
String Type
Jeremie Rossignol edited this page Aug 17, 2020
·
8 revisions
The string data type represents all textual strings. This data type is parsed differently than other data types - the expression syntax is limited to a "search and replace" of special identifiers and function calls. To use strings within functions, using use a "quoted string" or reference the string as an @variable.
Methods
Method Signature | Description |
---|---|
string ToUpper()
|
Uppercase version of the string. |
string ToLower()
|
Lowercase version of the string. |
string FirstCap()
|
Returns the string with the first letter capitalized. |
string FirstWord()
|
Returns the first word in a space-seperate list (ie. pull Jebediah out of Jebediah Kerman). |
bool Contains( string value)
|
Checks if the string contains the given sub-string. |
bool StartsWith( string value)
|
Checks if the string starts with the given sub-string. |
bool EndsWith( string value)
|
Checks if the string ends with the given sub-string. |
Global Functions
Function Signature | Description |
---|---|
string Format( string format, List <T> parameters)
|
Formats the string using Lingoona Grammar. Use this for localization of contract packs, so that the localization files don't have parameters in them (which could potentially break if the contract pack changes, or just make maintenance more difficult). |
- General Types
- KSP Types
- Contract Configurator Objects
- Other
- Global Functions
Contract Configurator
Configuration File Syntax
Extending Contract Configurator