Strings (functions): Difference between revisions
From PMDOWiki
Created page with "{{cleanup}} == STRINGS:LocaleCode == Gets the current language setting of the game. === Returns === The current language, represented by a locale code. == STRINGS:Format(System.String,System.Object[]) == Formats a string. Will unescape escaped characters and process grammar tags. === Arguments === * <code>fmt</code>: String to format. * <code>para</code>: Arguments === Returns === The formatted string. == STRINGS:FormatKey(System.String,System.Object[]) =..." |
No edit summary |
||
| (One intermediate revision by the same user not shown) | |||
| Line 1: | Line 1: | ||
{{ | {{Hat Note|More functions: [[Script Reference]]''}} | ||
Functions that relate to the manipulation of strings. | |||
== LocaleCode == | |||
Returns the current language setting of the game, represented by a locale code. {{FuncUsage|nmspace=STRINGS|nm=LocaleCode|args=}} | |||
== Format == | |||
== | |||
Formats a string. Will unescape escaped characters and process grammar tags. Returns the formatted string. {{FuncUsage|nmspace=STRINGS|nm=Format|args=str, args}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=str | |||
|type=String | |||
|techt=System.String | |||
|purp=The string to format. | |||
}} | |||
{{ArgRow | |||
|name=args | |||
|type=Table | |||
|techt=System.Object[] | |||
|purp=Additional arguments to pass into the string being formatted. | |||
}} | |||
|} | |||
== FormatKey == | |||
Formats a string given a string key. Will unescape escaped characters. {{FuncUsage|nmspace=STRINGS|nm=FormatKey|args=str, args}} | |||
Formats a string given a string key. | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=str | |||
|type=String | |||
|techt=System.String | |||
|purp=The string to format. | |||
}} | |||
{{ArgRow | |||
|name=args | |||
|type=Table | |||
|techt=System.Object[] | |||
|purp=Additional arguments to pass into the string being formatted. | |||
}} | |||
|} | |||
== LocalKeyString == | |||
Returns the string representing a button or key. {{FuncUsage|nmspace=STRINGS|nm=LocalKeyString|args=index}} | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=inputID | |||
|type=Integer | |||
|techt=System.Int32 | |||
|purp=The input type of the input. | |||
}} | |||
|} | |||
== CreateList == | |||
Builds and returns a single string of comma separated elements. {{FuncUsage|nmspace=STRINGS|nm=CreateList|args=}} | |||
Builds a single string of comma separated elements. | |||
=== Arguments === | === Arguments === | ||
{| class="wikitable" | |||
{{ArgHeader}} | |||
{{ArgRow | |||
|name=listStrings | |||
|type=Table of Strings | |||
|techt=NLua.LuaTable | |||
|purp=LuaTable of strings containing the elements to build the list from. | |||
}} | |||
|} | |||
Latest revision as of 03:29, 18 January 2026
More functions: Script Reference
Functions that relate to the manipulation of strings.
LocaleCode
Returns the current language setting of the game, represented by a locale code. Argument order is STRINGS:LocaleCode().
Format
Formats a string. Will unescape escaped characters and process grammar tags. Returns the formatted string. Argument order is STRINGS:Format(str, args).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| str | String | System.String
|
The string to format. |
| args | Table | System.Object[]
|
Additional arguments to pass into the string being formatted. |
FormatKey
Formats a string given a string key. Will unescape escaped characters. Argument order is STRINGS:FormatKey(str, args).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| str | String | System.String
|
The string to format. |
| args | Table | System.Object[]
|
Additional arguments to pass into the string being formatted. |
LocalKeyString
Returns the string representing a button or key. Argument order is STRINGS:LocalKeyString(index).
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| inputID | Integer | System.Int32
|
The input type of the input. |
CreateList
Builds and returns a single string of comma separated elements. Argument order is STRINGS:CreateList().
Arguments
| Name | Type | Technical Type | Purpose |
|---|---|---|---|
| listStrings | Table of Strings | NLua.LuaTable
|
LuaTable of strings containing the elements to build the list from. |
