Appearance
StringBuilder
Inherits: Class
Methods
Commit
lua
function StringBuilder:Commit()
-> stringCommits the string builder and returns the generated string.
Returns:
| Type | Description |
|---|---|
string |
GetParamCount
lua
function StringBuilder:GetParamCount(name)
-> numberGets the number of occurrences of a parameter in the template.
Parameters:
| Name | Type | Description |
|---|---|---|
name | string | The parameter name |
Returns:
| Type | Description |
|---|---|
number |
SetParam
lua
function StringBuilder:SetParam(name, value)
-> selfSets the value of a named parameter.
Parameters:
| Name | Type | Description |
|---|---|---|
name | string | The parameter name |
value | any | The parameter value |
Returns:
| Type | Description |
|---|---|
self |
SetTemplate
lua
function StringBuilder:SetTemplate(template)
-> selfSets the template.
Parameters:
| Name | Type | Description |
|---|---|---|
template | string | The template string to format |
Returns:
| Type | Description |
|---|---|
self |
Functions
Create
lua
function StringBuilder.Create()
-> StringBuilderCreates a new string builder object.
Returns:
| Type | Description |
|---|---|
StringBuilder |