Overload List
| # | Signature | Description |
|---|---|---|
| 1 | function Add(const S: string): Integer; overload; | Adds S: at the end, or, in a sorted list, at its place. |
| 2 | function Add(const Src: string; const SrcIdx, SrcLen: Integer): Integer; overload; | Adds SrcLen characters of Src from SrcIdx (1-based) as an item. |
Overload 1: function Add(const S: string): Integer; overload;
Adds S: at the end, or, in a sorted list, at its place.
| # | Name | Description |
|---|---|---|
| 1 | S | The text, every text kind; it may be an item of this list. |
Returns: Integer - The new item's index; in a sorted list under dupIgnore, the index of the equal item already there.
A Substring is stored as an assignment stores it: a view stays a view of the same characters (List[i] of another item included, which dangles once that item is written or deleted); a list's long item, or a Substring taken from one, is shared; any other text is copied.
Overload 2: function Add(const Src: string; const SrcIdx, SrcLen: Integer): Integer; overload;
Adds SrcLen characters of Src from SrcIdx (1-based) as an item.
| # | Name | Description |
|---|---|---|
| 1 | Src | The text, every text kind but Char. |
| 2 | SrcIdx | The part's first character, from 1. |
| 3 | SrcLen | The part's length. |
Returns: Integer - The new item's index.
The range must lie inside Src, else ESubstringRangeError is raised.