Difference between revisions of "Lua:Class:Stringlist"
Jump to navigation
Jump to search
m (moved Stringlist to Lua:Class:Stringlist) |
m |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
[[Category:Lua]] | [[Category:Lua]] | ||
| − | + | StringList '''class''': ('''Inheritance''': ''[[Lua:Class:Strings|Strings]]''->''[[Lua:Class:Object|Object]]'') | |
| − | |||
| − | + | The Stringlist class represents a list of strings with optional sorting, duplicate handling, and case sensitivity. | |
| − | + | You can create a Stringlist object using <code>createStringlist()</code>. | |
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| − | |||
| + | == Properties == | ||
| + | {| class="wikitable" style="width:100%" | ||
| + | ! Property | ||
| + | ! Type | ||
| + | ! Description | ||
| + | |- | ||
| + | | Sorted | ||
| + | | Boolean | ||
| + | | Determines if the list should be sorted. | ||
| + | |- | ||
| + | | Duplicates | ||
| + | | [[DuplicatesType]] | ||
| + | | Determines how duplicates are handled when the list is sorted (see enum below). | ||
| + | |- | ||
| + | | CaseSensitive | ||
| + | | Boolean | ||
| + | | Determines if the list is case sensitive. | ||
| + | |} | ||
| + | |||
| + | == Methods == | ||
| + | {| class="wikitable" style="width:100%" | ||
| + | ! Method | ||
| + | ! Parameters | ||
| + | ! Returns | ||
| + | ! Description | ||
| + | |- | ||
| + | | getDuplicates | ||
| + | | None | ||
| + | | [[DuplicatesType]] | ||
| + | | Returns the duplicates property. | ||
| + | |- | ||
| + | | setDuplicates | ||
| + | | [[DuplicatesType]] | ||
| + | | None | ||
| + | | Sets the duplicates property (<code>dupIgnore</code>, <code>dupAccept</code>, <code>dupError</code>). | ||
| + | |- | ||
| + | | getSorted | ||
| + | | None | ||
| + | | Boolean | ||
| + | | Returns true if the list is sorted. | ||
| + | |- | ||
| + | | setSorted | ||
| + | | Boolean | ||
| + | | None | ||
| + | | Sets the sorted property. | ||
| + | |- | ||
| + | | getCaseSensitive | ||
| + | | None | ||
| + | | Boolean | ||
| + | | Returns true if the list is case sensitive. | ||
| + | |- | ||
| + | | setCaseSensitive | ||
| + | | Boolean | ||
| + | | None | ||
| + | | Sets the case sensitive property. | ||
| + | |} | ||
| + | |||
| + | == DuplicatesType Enum == | ||
| + | {| class="wikitable" | ||
| + | ! Name | ||
| + | ! Value | ||
| + | ! Description | ||
| + | |- | ||
| + | | dupIgnore | ||
| + | | 0 | ||
| + | | Ignore duplicate entries. | ||
| + | |- | ||
| + | | dupAccept | ||
| + | | 1 | ||
| + | | Accept duplicate entries. | ||
| + | |- | ||
| + | | dupError | ||
| + | | 2 | ||
| + | | Raise an error on duplicate entries. | ||
| + | |} | ||
{{LuaSeeAlso}} | {{LuaSeeAlso}} | ||
| + | |||
| + | === Related Classes === | ||
| + | * [[Lua:Class:Object|Object]] | ||
| + | * [[Lua:Class:Strings|Strings]] | ||
Latest revision as of 18:28, 11 July 2025
StringList class: (Inheritance: Strings->Object)
The Stringlist class represents a list of strings with optional sorting, duplicate handling, and case sensitivity.
You can create a Stringlist object using createStringlist().
Properties[edit]
| Property | Type | Description |
|---|---|---|
| Sorted | Boolean | Determines if the list should be sorted. |
| Duplicates | DuplicatesType | Determines how duplicates are handled when the list is sorted (see enum below). |
| CaseSensitive | Boolean | Determines if the list is case sensitive. |
Methods[edit]
| Method | Parameters | Returns | Description |
|---|---|---|---|
| getDuplicates | None | DuplicatesType | Returns the duplicates property. |
| setDuplicates | DuplicatesType | None | Sets the duplicates property (dupIgnore, dupAccept, dupError).
|
| getSorted | None | Boolean | Returns true if the list is sorted. |
| setSorted | Boolean | None | Sets the sorted property. |
| getCaseSensitive | None | Boolean | Returns true if the list is case sensitive. |
| setCaseSensitive | Boolean | None | Sets the case sensitive property. |
DuplicatesType Enum[edit]
| Name | Value | Description |
|---|---|---|
| dupIgnore | 0 | Ignore duplicate entries. |
| dupAccept | 1 | Accept duplicate entries. |
| dupError | 2 | Raise an error on duplicate entries. |