Difference between revisions of "Lua:Class:Stringlist"

From Cheat Engine
Jump to navigation Jump to search
m
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
[[Category:Lua]]
 
[[Category:Lua]]
Stringlist Class: (Inheritance : Strings->Object)
+
StringList '''class''': ('''Inheritance''': ''[[Lua:Class:Strings|Strings]]''->''[[Lua:Class:Object|Object]]'')
createStringlist() : Creates a stringlist class object (for whatever reason, lua strings are probably easier to use)
 
  
===properties===
+
The Stringlist class represents a list of strings with optional sorting, duplicate handling, and case sensitivity. 
    Duplicates : DuplicatesType - Determines how duplicates should be handled
+
You can create a Stringlist object using <code>createStringlist()</code>.
    Sorted : boolean - Determines if the list should be sorted
 
    CaseSensitive: boolean - Determines if the list is case sensitive or not.
 
===methods===
 
    getDuplicates() : returns the duplicates property
 
    setDuplicates(Duplicates) : Sets the duplicates property (dupIgnore, dupAccept, dupError)
 
    getSorted() : returns true if the list has the sorted property
 
    setSorted(boolean) : Sets the sorted property
 
    getCaseSensitive() : Returns true if the case sensitive property is set
 
    setCaseSensitive(boolean): Sets the case sensitive property
 
  
 +
== 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.

See also[edit]

Related Classes[edit]