The Conroy & Conroy Subroutine Library (2021.3 edition)

TString_List
What: class
Ancestor: TString_Collection
File: Collect
Layer: 0
Platforms: C++, C#, Javascript, Pascal (All), PHP, Python

This class provides a collection of strings. For languages without strict typing (Javascript, PHP, Python, etc) this class stores collections of any data desired. The items in the collection are referenced by indexes (0 is the first). The collection can be sorted. Each item in the collection has an associated pointer value, which remains associated with the string even after sorting.

At
string At( int Index )
function At( Index : integer ) : string
Returns the item at the specified index.

AtDelete
void AtDelete( int Item )
procedure AtDelete( Index : integer )
Deletes the item at the specified index.

AtInsert
void AtInsert( int Index, string Item )
procedure AtInsert( Index : integer ; Item : string )
Inserts the specified item at the specified index. The item previously at that index and all items above it are moved up one index.

AtPut
void AtPut( int Index, string Value )
procedure AtPut( Index : integer ; Value : string )
Sets the value at a specific index.

Count
int Count()
function Count : integer
Returns the count of items in the collection.

Delete
void Delete( string Item )
procedure Delete( Item : string )
Deletes the items matching the passed items.

DeleteAll
void DeleteAll()
procedure DeleteAll
Deletes all items in the collection.

IndexOf
int IndexOf( string Item )
function IndexOf( Item : string ) : integer
Returns the index of the first item matching the passed value.

Insert
void Insert( string Item )
procedure Insert( Item : string )
Adds the passed item to the end of the collection.

Limit
int Limit()
function Limit : integer
Returns the current capacity for the collection.

Objects
void* Objects( int Index )
function Objects( Index : integer ) : pointer
Returns the pointer associated with the specified index.

SetLimit
void SetLimit( int ALimit )
procedure SetLimit( ALimit : integer )
Sets the total capacity of the collection to the passed value.

Sort
void Sort()
procedure Sort()
Sorts the strings in the collection. Note: the collection will not remain sorted if unsorted data is added to the collection.