Difference between revisions of "Lua:createStringlist"
Jump to navigation
Jump to search
(Initial page creation.) |
m (Added related function template.) |
||
| Line 21: | Line 21: | ||
===Examples=== | ===Examples=== | ||
| − | < | + | <syntaxhighlight lang="lua" line> |
local list = createStringlist() | local list = createStringlist() | ||
list.add("first entry") | list.add("first entry") | ||
list.add("second entry") | list.add("second entry") | ||
| − | </ | + | </syntaxhighlight> |
{{LuaSeeAlso}} | {{LuaSeeAlso}} | ||
| + | |||
| + | {{Creation}} | ||
Latest revision as of 23:53, 26 June 2026
Creates an empty StringList object.
StringList is useful when an API expects a CE string collection rather than a native Lua table.
Function Parameters[edit]
| Parameter | Type | Description |
|---|---|---|
| None | — | This function does not take parameters. |
Returns[edit]
StringList — A new empty string list.
Examples[edit]
1 local list = createStringlist()
2 list.add("first entry")
3 list.add("second entry")