the fair gds editor MacroClassStringList

StringList Class Reference

The stringList class provides a list of strings. More...

See also: string, List of Classes


Detailed Description

The stringList class provides a list of strings. In scripting interfaces supporting lists of strings this class will be mapped to the native classes.

Member Function Documentation

stringList::stringList( )

creates a list of strings

stringList::stringList(stringList list)

creates a list of strings with a copy of list. (introduced with version 20170520)

void stringList::append(string s)

Insert s at the end of the list.

string stringList::at(int i)

Returns: string at the postion i

void stringList::clear()

Removes all strings from the list. (introduced with version 20160102)

bool stringList::contains(string str)

Returns: true if the stringList contains the string str. Otherwise false.

int stringList::indexOf(string str, int index=0)

Returns: Returns the index position of the first occurrence of the string str in this list, searching forward from index position from. Returns -1 if str is not found. (introduced with version 20130411)

void stringList::insert(int pos, string value)

value is added at position pos (introduced with version 20161005)

int stringList::removeAll(string s)

Removes all occurrences of s in the list and returns the number of entries removed.

void stringList::removeAt(int pos)

position pos is removed from the list (introduced with version 20161005)

int stringList::size()

Returns: number of string in the stringList

void stringList::set(int i, string s)

Sets the ith entry of the list to s. 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 i.

void stringList::swap(int pos1, int pos2)

Swaps the value at pos1 and pos2 (introduced with version 20161005)

See also


CategoryMacroClass CategoryMacroClassBasic


MacroClassStringList (last edited 2017-05-21 09:16:32 by JurgenThies)