Overload List
| # | Signature | Description |
|---|---|---|
| 1 | procedure Append(const C: Char); overload; | |
| 2 | procedure Append(const P: PChar; const Count: Integer); overload; | |
| 3 | procedure Append(const S: Substring); overload; | Appends S after the text, in place. |
| 4 | procedure Append(const S: string); overload; |
Overload 1: procedure Append(const C: Char); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | C | Char |
Result: stored in self (calling object)
Overload 2: procedure Append(const P: PChar; const Count: Integer); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | P | PChar | |
| 2 | Count | Integer |
Result: stored in self (calling object)
Overload 3: procedure Append(const S: Substring); overload;
Appends S after the text, in place.
| # | Name | Description |
|---|---|---|
| 1 | S | The text appended: a Substring, a string, a Char, or Count characters at a PChar. |
Result: stored in self (calling object)
Remarks:
The characters must be the string's own, shared with no other string, else ESubstringInPlaceError is raised; MakeUnique gives the string its own copy first. Within the room the string has or its Capacity - no memory is taken. Past it the string grows, or, while SubstringAllocCheck is True, ESubstringAllocError is raised.
Examples
Appending every kind.
uses Substr;
procedure Example;
var s: Substring;
begin
s := Substring('ab');
s.Append('cd');
s.Append(Char('!'));
s.Append(PChar('xyz'), 2);
Assert(s = 'abcd!xy');
end;
See Also: Substring.AppendInt, Substring.Capacity
Overload 4: procedure Append(const S: string); overload;
| # | Name | Type | Description |
|---|---|---|---|
| 1 | S | string |
Result: stored in self (calling object)