Class TCastleStringList

Unit

Declaration

type TCastleStringList = class(TStringList)

Description

List of strings. This is a slightly extended version of standard TStringList. The default CaseSensitive value is True.

Hierarchy

Overview

Methods

Public constructor Create;
Public procedure AddRange(const Source: TStrings); overload;
Public procedure AddList(const Source: TStrings); deprecated 'use AddRange, consistent with other lists';
Public procedure AddRange(const A: array of string); overload;
Public procedure AddArray(const A: array of string); deprecated 'use AddRange, consistent with other lists';
Public procedure AssignArray(const A: array of string); deprecated 'use Assign';
Public procedure Assign(const A: array of string); overload;
Public function Equals(SecondValue: TObject): boolean; override; overload;
Public function Equals(const A: array of string): boolean; overload;
Public function PerfectlyEquals(const SecondValue: TStringList): boolean;
Public procedure Reverse;

Properties

Public property Count: Integer read GetCount write SetCount;
Public property L[constIndex:TListSize]: string read GetL write SetL;

Description

Methods

Public constructor Create;
 
Public procedure AddRange(const Source: TStrings); overload;

Add strings from Source list. Alias for AddStrings, useful for usage with macros, since it's consistent with AddRange in other lists.

Public procedure AddList(const Source: TStrings); deprecated 'use AddRange, consistent with other lists';

Warning: this symbol is deprecated: use AddRange, consistent with other lists

 
Public procedure AddRange(const A: array of string); overload;
 
Public procedure AddArray(const A: array of string); deprecated 'use AddRange, consistent with other lists';

Warning: this symbol is deprecated: use AddRange, consistent with other lists

 
Public procedure AssignArray(const A: array of string); deprecated 'use Assign';

Warning: this symbol is deprecated: use Assign

 
Public procedure Assign(const A: array of string); overload;
 
Public function Equals(SecondValue: TObject): boolean; override; overload;

Does another string list have equal length and content.

Any other TStrings descendant may be equal to this instance, we don't require it to be a TCastleStringList instance. We also don't check all the properties, like Delimiter or such. We only compare the contents: count, and actual strings.

The comparison is case-sensitive, or not, depending on the value of CaseSensitive property of this list.

Public function Equals(const A: array of string): boolean; overload;

In Delphi, they have non-virtual TStringList.Equals that hides virtual TObject.Equals...

Public function PerfectlyEquals(const SecondValue: TStringList): boolean;

Does the SecondValue have equal length and content.

This method does the same thing as Equals. It is defined for consistency – on some lists, like TSingleList, there is an important difference between Equals (compares with some epsilon tolerance) and PerfectlyEquals.

Public procedure Reverse;

Reverse the order of items on the array.

Properties

Public property Count: Integer read GetCount write SetCount;
 
Public property L[constIndex:TListSize]: string read GetL write SetL;

Access strings. This is exactly equivalent to just using standard TStringList.Strings property, and is useful only for implementing macros that work for both TCastleStringList and TStructList.


Generated by PasDoc 0.16.0.