The stringList class provides a list of strings. More...
stringList() | |
stringList(stringList list) | |
void | append(string item) |
string | at(int pos) |
void | clear() |
bool | contains(string item) |
int | indexOf(string search, int start=0) |
void | insert(int pos, string value) |
string | join(string separator) |
void | prepend(string value) |
int | removeAll(string item) |
void | removeAt(int pos) |
int | size() |
void | set(int pos, string item) |
void | sortList(int style=0) |
void | swap(int pos1, int pos2) |
The stringList class provides a list of string datatypes. The class methods are very similar to other list classes.
If the scripting language supports native an arrays of string, this classed is mapped to the native methods.
A new empty stringList is created.
Creates a new list of strings with a copy of list.
Insert item at the end of the list.
Returns: string at the postion pos
Removes all items from the list.
Returns: true ,if the stringList contains the string item. Otherwise false is returned.
Returns: Returns the index position of the first occurrence of the string search in this list, searching forward from start position. Returns -1, if search is not found.
value is added at position pos. All items at a position afterwards will move one position.
Joins all the string list's strings into a single string with each element separated by the given separator (which can be an empty string). (introduced with release 20180614)
added to new item a the beginning of the list. (introduced with release 20180614)
Removes all occurrences of item in the list and returns the number of entries removed.
Position pos is removed from the list. The size of the list is reduced by 1.
Returns: number of string in the stringList.
Sets the posth entry of the list to item. The first entry of the list starts with 0. It will have no effect, if the list did not have at least a size of pos items.
The list ist sorted. style determine the order style:
Values: | Alignment: |
---|---|
0 | case insensitive |
1 | case sensitive |
10 | by integer value (e.g. 1, 4, 8, 12, 34, 765 ) |
(introduced with release 20201224)
Swaps the value at ''pos1'' and ''pos2''.